NumberConstructor

@native @JSType trait NumberConstructor extends StObject with Instantiable0[Number] with Instantiable1[Any, Number]
trait Instantiable1[Any, Number]
trait Instantiable0[Number]
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(): Double
def apply(value: Any): Double
def isFinite(number: Any): Boolean

Returns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true.

Returns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true.

Value Params
number

A numeric value.

def isInteger(number: Any): Boolean

Returns true if the value passed is an integer, false otherwise.

Returns true if the value passed is an integer, false otherwise.

Value Params
number

A numeric value.

def isNaN(number: Any): Boolean

Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true.

Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true.

Value Params
number

A numeric value.

def isSafeInteger(number: Any): Boolean

Returns true if the value passed is a safe integer.

Returns true if the value passed is a safe integer.

Value Params
number

A numeric value.

def parseFloat(string: String): Double

Converts a string to a floating-point number.

Converts a string to a floating-point number.

Value Params
string

A string that contains a floating-point number.

def parseInt(string: String): Double

Converts A string to an integer.

Converts A string to an integer.

Value Params
radix

A value between 2 and 36 that specifies the base of the number in string. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.

string

A string to convert into a number.

def parseInt(string: String, radix: Double): Double

Inherited methods

def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

val EPSILON: Double

The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10‍−‍16.

The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10‍−‍16.

val MAX_SAFE_INTEGER: Double

The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.

The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.

val MAX_VALUE: Double

The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308.

The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308.

val MIN_SAFE_INTEGER: Double

The value of the smallest integer n such that n and n − 1 are both exactly representable as a Number value. The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).

The value of the smallest integer n such that n and n − 1 are both exactly representable as a Number value. The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).

val MIN_VALUE: Double

The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324.

The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324.

val NEGATIVE_INFINITY: Double

A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE_INFINITY values as -infinity.

A value that is less than the largest negative number that can be represented in JavaScript. JavaScript displays NEGATIVE_INFINITY values as -infinity.

val NaN: Double

A value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.

A value that is not a number. In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.

val POSITIVE_INFINITY: Double

A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE_INFINITY values as infinity.

A value greater than the largest number that can be represented in JavaScript. JavaScript displays POSITIVE_INFINITY values as infinity.