Question whether given number is odd

number:is_odd?(INT $number) : BOOL

number:is_odd?(0)
#=> FALSE

number:is_odd?(1)
#=> TRUE

number:is_odd?(2)
#=> FALSE

number:is_odd?(3)
#=> TRUE

# note: number will be transformed to INT
number:is_odd?(3.0)
#=> TRUE

number:is_odd?(3.4)
#=> TRUE

# note: negative numbers are OK
number:is_odd?(-11)
#=> TRUE

number:is_odd?(-10)
#=> FALSE

Copyright ©2013-2022 SunSed®. All rights reserved.