new Number()
- Source:
Members
-
(static) FORMAT_DECIMAL_MARK :String
-
Default decimal mark used in the format function.
Type:
- Source:
-
(static) FORMAT_THOUSANDS_SEPARATOR :String
-
Default thousands separator used in the format function.
Type:
- Source:
-
(static) global
-
Global functions working with numbers. Compared to own Number's methods, these convert the value to a number first.
- Source:
Properties:
Name Type Description isNaN
function isFinite
function -
(static) Infinity :Number
-
Type:
- Source:
Methods
-
(static) is(value) → {Boolean}
-
Determines whether the given value is a number.
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Boolean
-
(static) isFinite(value) → {Boolean}
-
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Boolean
-
(static) isInteger(value) → {Boolean}
-
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Boolean
-
(static) isNaN(value) → {Boolean}
-
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Boolean
-
(static) isNumeric(value) → {Boolean}
-
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Boolean
-
(static) parse(value) → {Number}
-
Alias for Number.parseFloat
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Number
-
(static) parseFloat(value) → {Number}
-
Parameters:
Name Type Description value
* - Source:
Returns:
- Type
- Number
-
(static) parseInt(value, radixopt) → {Number}
-
Parameters:
Name Type Attributes Description value
* radix
Number <optional>
- Source:
Returns:
- Type
- Number
-
abs() → {Number}
-
- Source:
Returns:
- Type
- Number
-
ceil(decimalsopt) → {Number}
-
Parameters:
Name Type Attributes Default Description decimals
Number <optional>
0 - Source:
Returns:
- Type
- Number
-
floor(decimalsopt) → {Number}
-
Parameters:
Name Type Attributes Default Description decimals
Number <optional>
0 - Source:
Returns:
- Type
- Number
-
format(decimalsopt, thousandsSeparatoropt, decimalMarkopt) → {String}
-
Parameters:
Name Type Attributes Default Description decimals
Number <optional>
0 thousandsSeparator
String <optional>
"," decimalMark
String <optional>
"." - Source:
Returns:
- Type
- String
-
limit(from, to) → {Number}
-
Parameters:
Name Type Description from
Number to
Number - Source:
Returns:
- Type
- Number
-
limitBottom(from) → {Number}
-
Parameters:
Name Type Description from
Number - Source:
Returns:
- Type
- Number
-
limitTop(to) → {Number}
-
Parameters:
Name Type Description to
Number - Source:
Returns:
- Type
- Number
-
log(baseopt) → {Number}
-
Parameters:
Name Type Attributes Default Description base
Number <optional>
Math.E - Source:
Returns:
- Type
- Number
-
mod(n) → {Number}
-
Parameters:
Name Type Description n
Number - Source:
Returns:
- Type
- Number
-
pow(exponentopt) → {Number}
-
Parameters:
Name Type Attributes Default Description exponent
Number <optional>
2 - Source:
Returns:
- Type
- Number
-
round(decimalsopt) → {Number}
-
Parameters:
Name Type Attributes Default Description decimals
Number <optional>
0 - Source:
Returns:
- Type
- Number
-
sign() → {Number}
-
- Source:
Returns:
(-1 | 0 | 1)- Type
- Number
-
sqrt() → {Number}
-
- Source:
Returns:
- Type
- Number
-
toDeg() → {Number}
-
Converts radians to degrees.
- Source:
Returns:
- Type
- Number
-
toFloat() → {Number}
-
- Source:
Returns:
- Type
- Number
-
toInt() → {Number}
-
Alias for Number#trunc
- Source:
Returns:
- Type
- Number
-
toRad() → {Number}
-
Converts degrees to radians.
- Source:
Returns:
- Type
- Number
-
trunc() → {Number}
-
- Source:
Returns:
- Type
- Number