Numbers.isFloat()
Syntax
function isFloat(value: number): boolean
Checks if a number is a floating point number.
Parameters | |
value
|
A number which may or may not be a floating point number. |
Example
import { Numbers } from 'potence';
Numbers.isFloat(1); // -> false
Numbers.isFloat(1.05); // -> true
Remarks
This function always returns false for
NaN
,
Infinity
,
and -Infinity
.
To check whether a number is an integer, use
Number.isInteger()
.