interface IDecimal<T> { abs(this): T; add(this,
a): T; cbrt(this): T; div(this,
a): T; equals(this,
a): boolean; floor(this): T; gt(this,
a): boolean; gte(this,
a): boolean; lessThan(this,
a): boolean; lt(this,
a): boolean; lte(this,
a): boolean; mul(this,
a): T; pow(this,
a): T; sqrt(this): T; sub(this,
a): T; toNumber(this): number; toPrecision(n): string; toString(): string; } Methods
equals
- equals(this, a): boolean
Returns boolean
gt
- gt(this, a): boolean
Returns boolean
gte
- gte(this, a): boolean
Returns boolean
lessThan
- lessThan(this, a): boolean
Returns boolean
lt
- lt(this, a): boolean
Returns boolean
lte
- lte(this, a): boolean
Returns boolean
toNumber
- toNumber(this): number
Returns number
toPrecision
- toPrecision(n): string
Returns string
toString
- toString(): string
Returns string
A Decimal.js-compatible number. This matches Decimal.js's interface, without adding an explcit Decimal.js dependency.
Tested with Decimal.js itself, and break_infinity.js.