1
0
mirror of https://github.com/MikeMcl/decimal.js.git synced 2026-09-24 21:04:32 +00:00

Add Decimal.isDecimal and config reset

This commit is contained in:
Michael Mclaughlin
2017-12-09 22:05:28 +00:00
parent 17a358f2f4
commit fd668fea70
7 changed files with 191 additions and 35 deletions

3
decimal.d.ts vendored
View File

@@ -76,6 +76,7 @@ interface DecimalConfig {
// Requires `toFormat` <https://github.com/MikeMcl/toFormat>.
format?: DecimalFormat;
defaults?: boolean;
}
// Requires `toFormat`.
@@ -92,6 +93,7 @@ export declare class Decimal {
readonly d: number[];
readonly e: number;
readonly s: number;
private readonly name: string;
constructor(n: DecimalValue);
@@ -285,6 +287,7 @@ export declare class Decimal {
static exp(n: DecimalValue): Decimal
static floor(n: DecimalValue): Decimal
static hypot(...n: DecimalValue[]): Decimal
static isDecimal(object: any): boolean
static ln(n: DecimalValue): Decimal
static log(n: DecimalValue, base?: DecimalValue): Decimal
static log2(n: DecimalValue): Decimal