From 69e91fecd277f5ec048873ea83da41ca6c50c3c9 Mon Sep 17 00:00:00 2001 From: Michael Mclaughlin Date: Tue, 22 Jun 2021 12:50:27 +0100 Subject: [PATCH] Update definitions with sum and clamp --- decimal.d.ts | 5 +++++ decimal.global.d.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/decimal.d.ts b/decimal.d.ts index 428089d..e036c50 100644 --- a/decimal.d.ts +++ b/decimal.d.ts @@ -64,6 +64,9 @@ export declare class Decimal { abs(): Decimal; ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; comparedTo(n: Decimal.Value): number; cmp(n: Decimal.Value): number; @@ -239,6 +242,7 @@ export declare class Decimal { static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; static cbrt(n: Decimal.Value): Decimal; static ceil(n: Decimal.Value): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; static clone(object?: Decimal.Config): Decimal.Constructor; static config(object: Decimal.Config): Decimal.Constructor; static cos(n: Decimal.Value): Decimal; @@ -266,6 +270,7 @@ export declare class Decimal { static sinh(n: Decimal.Value): Decimal; static sqrt(n: Decimal.Value): Decimal; static sub(x: Decimal.Value, y: Decimal.Value): Decimal; + static sum(...n: Decimal.Value[]): Decimal; static tan(n: Decimal.Value): Decimal; static tanh(n: Decimal.Value): Decimal; static trunc(n: Decimal.Value): Decimal; diff --git a/decimal.global.d.ts b/decimal.global.d.ts index 0b0446b..5960a2d 100644 --- a/decimal.global.d.ts +++ b/decimal.global.d.ts @@ -85,6 +85,9 @@ export declare class Decimal { abs(): Decimal; ceil(): Decimal; + + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; + clamp(min: Decimal.Value, max: Decimal.Value): Decimal; comparedTo(n: DecimalValue): number; cmp(n: DecimalValue): number; @@ -260,6 +263,7 @@ export declare class Decimal { static atan2(y: DecimalValue, x: DecimalValue): Decimal; static cbrt(n: DecimalValue): Decimal; static ceil(n: DecimalValue): Decimal; + static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; static clone(object?: DecimalConfig): DecimalConstructor; static config(object: DecimalConfig): DecimalConstructor; static cos(n: DecimalValue): Decimal; @@ -287,6 +291,7 @@ export declare class Decimal { static sinh(n: DecimalValue): Decimal; static sqrt(n: DecimalValue): Decimal; static sub(x: DecimalValue, y: DecimalValue): Decimal; + static sum(...n: Decimal.Value[]): Decimal; static tan(n: DecimalValue): Decimal; static tanh(n: DecimalValue): Decimal; static trunc(n: DecimalValue): Decimal;