Number class
An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers.
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- Number([dynamic value])
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- epsilon → num
-
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.
no setter
- isFinite ↔ bool Function([Object?])
-
getter/setter pair
- isInteger ↔ bool Function([Object?])
-
getter/setter pair
- isNaN ↔ bool Function([Object?])
-
getter/setter pair
- isSafeInteger ↔ bool Function([Object?])
-
getter/setter pair
- maxSafeInteger → num
-
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.
no setter
- maxValue → num
-
The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308.
no setter
- minSafeInteger → num
-
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)).
no setter
- minValue → num
-
The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324.
no setter
- naN → num
-
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.
no setter
- negativeInfinity → num
-
A value that is less than the largest negative number that can be represented in JavaScript.
JavaScript displays NEGATIVE_INFINITY values as -infinity.
no setter
- parseFloat ↔ num Function(String)
-
getter/setter pair
- parseInt ↔ num Function(String, [num?])
-
getter/setter pair
- positiveInfinity → num
-
A value greater than the largest number that can be represented in JavaScript.
JavaScript displays POSITIVE_INFINITY values as infinity.
no setter