Numbers.isOdd()
Syntax
function isOdd(value: number): boolean
Checks if a number is an odd number.
Parameters | |
value
|
A number which may or may not be odd. |
Example
import { Numbers } from 'potence';
Numbers.isOdd(16); // -> false
Numbers.isOdd(5); // -> true
Remarks
Floating point numbers are never odd. The same goes for
NaN
,
Infinity
,
and -Infinity
.
Compare Numbers.isEven()
.