double class

A double-precision floating point number.

A double-precision floating point number.

Representation of Dart doubles containing double specific constants and operations and specializations of operations inherited from num. Dart doubles are 64-bit floating-point numbers as specified in the IEEE 754 standard.

The double type is contagious. Operations on doubles return double results.

It is a compile-time error for a class to attempt to extend or implement double.

Extends

Constructors

double()

Constants

NAN = 0.0 / 0.0
INFINITY = 1.0 / 0.0
NEGATIVE_INFINITY = -INFINITY
MIN_POSITIVE = 5e-324
MAX_FINITE = 1.7976931348623157e+308

Static Methods

parse(String source, [double onError(String source)]) → double
Parse source as an double literal and return its value.

Instance Properties

sign double
read-only
isNegative bool Inherited
read-only
isInfinite bool Inherited
read-only
isNaN bool Inherited
read-only
hashCode int Inherited
read-only
isFinite bool Inherited
read-only

Instance Methods

remainder(num other) → double
Returns the remainder of the truncating division of this by [other].
abs() → double
Returns the absolute value of this double.
round() → int
Returns the integer closest to this.
floor() → int
Returns the greatest integer no greater than this.
ceil() → int
Returns the least integer no smaller than this.
truncate() → int
Returns the integer obtained by discarding any fractional digits from this.
roundToDouble() → double
Returns the integer double value closest to this.
floorToDouble() → double
Returns the greatest integer double value no greater than this.
ceilToDouble() → double
Returns the least integer double value no smaller than this.
truncateToDouble() → double
Returns the integer double value obtained by discarding any fractional digits from this.
toString() → String
Provide a representation of this double value.
toStringAsFixed(int fractionDigits) → String Inherited
Returns a decimal-point string-representation of this.
toStringAsPrecision(int precision) → String Inherited
Converts this to a double and returns a string representation with exactly precision significant digits.
compareTo(num other) → int Inherited
Compares this to other.
toDouble() → double Inherited
Return this num as a double.
clamp(num lowerLimit, num upperLimit) → num Inherited
Returns this num clamped to be in the range lowerLimit-upperLimit.
toStringAsExponential([int fractionDigits]) → String Inherited
Returns an exponential string-representation of this.
toInt() → int Inherited
Truncates this num to an integer and returns the result as an int.

Operators

operator +(num other) → double
Addition operator.
operator -(num other) → double
Subtraction operator.
operator *(num other) → double
Multiplication operator.
operator %(num other) → double
Euclidean modulo operator.
operator /(num other) → double
Division operator.
operator ~/(num other) → int
Truncating division operator.
operator unary-() → double
Negate operator.
operator <(num other) → bool Inherited
Relational less than operator.
operator >=(num other) → bool Inherited
Relational greater than or equal operator.
operator ==(Object other) → bool Inherited
Test whether this value is numerically equal to other.
operator <=(num other) → bool Inherited
Relational less than or equal operator.
operator >(num other) → bool Inherited
Relational greater than operator.