Skip to content
Tania Shatilova edited this page Nov 10, 2015 · 1 revision

The isFloat() method determines whether the passed value is an float.

Syntax

var isFloat = Mint.utils.isFloat(1.2);

Parameters

  • value - The value to be tested for being a float.

Return Value

true if the tested object is integer; otherwise, false.

Examples

Mint.utils.isFloat(0.1);      // true
Mint.utils.isFloat(-10.1);    // true
Mint.utils.isFloat(1);        // true
Mint.utils.isFloat(Math.PI);  // true
Mint.utils.isFloat(-100000);  // true
Mint.utils.isFloat(NaN);      // false
Mint.utils.isFloat(0);        // true
Mint.utils.isFloat("10");     // false

Clone this wiki locally