Skip to content

Commit 69e91fe

Browse files
committed
Update definitions with sum and clamp
1 parent d102ead commit 69e91fe

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

decimal.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export declare class Decimal {
6464
abs(): Decimal;
6565

6666
ceil(): Decimal;
67+
68+
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
69+
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
6770

6871
comparedTo(n: Decimal.Value): number;
6972
cmp(n: Decimal.Value): number;
@@ -239,6 +242,7 @@ export declare class Decimal {
239242
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
240243
static cbrt(n: Decimal.Value): Decimal;
241244
static ceil(n: Decimal.Value): Decimal;
245+
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
242246
static clone(object?: Decimal.Config): Decimal.Constructor;
243247
static config(object: Decimal.Config): Decimal.Constructor;
244248
static cos(n: Decimal.Value): Decimal;
@@ -266,6 +270,7 @@ export declare class Decimal {
266270
static sinh(n: Decimal.Value): Decimal;
267271
static sqrt(n: Decimal.Value): Decimal;
268272
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
273+
static sum(...n: Decimal.Value[]): Decimal;
269274
static tan(n: Decimal.Value): Decimal;
270275
static tanh(n: Decimal.Value): Decimal;
271276
static trunc(n: Decimal.Value): Decimal;

decimal.global.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export declare class Decimal {
8585
abs(): Decimal;
8686

8787
ceil(): Decimal;
88+
89+
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
90+
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
8891

8992
comparedTo(n: DecimalValue): number;
9093
cmp(n: DecimalValue): number;
@@ -260,6 +263,7 @@ export declare class Decimal {
260263
static atan2(y: DecimalValue, x: DecimalValue): Decimal;
261264
static cbrt(n: DecimalValue): Decimal;
262265
static ceil(n: DecimalValue): Decimal;
266+
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
263267
static clone(object?: DecimalConfig): DecimalConstructor;
264268
static config(object: DecimalConfig): DecimalConstructor;
265269
static cos(n: DecimalValue): Decimal;
@@ -287,6 +291,7 @@ export declare class Decimal {
287291
static sinh(n: DecimalValue): Decimal;
288292
static sqrt(n: DecimalValue): Decimal;
289293
static sub(x: DecimalValue, y: DecimalValue): Decimal;
294+
static sum(...n: Decimal.Value[]): Decimal;
290295
static tan(n: DecimalValue): Decimal;
291296
static tanh(n: DecimalValue): Decimal;
292297
static trunc(n: DecimalValue): Decimal;

0 commit comments

Comments
 (0)