Last change
on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
888 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | export declare const isPresent: (value: unknown) => boolean;
|
---|
| 2 | export declare const round: (number: number, digits?: number, base?: number) => number;
|
---|
| 3 | export declare const floor: (number: number, digits?: number, base?: number) => number;
|
---|
| 4 | /**
|
---|
| 5 | * Clamps a value between an upper and lower bound.
|
---|
| 6 | * We use ternary operators because it makes the minified code
|
---|
| 7 | * is 2 times shorter then `Math.min(Math.max(a,b),c)`
|
---|
| 8 | * NaN is clamped to the lower bound
|
---|
| 9 | */
|
---|
| 10 | export declare const clamp: (number: number, min?: number, max?: number) => number;
|
---|
| 11 | /**
|
---|
| 12 | * Processes and clamps a degree (angle) value properly.
|
---|
| 13 | * Any `NaN` or `Infinity` will be converted to `0`.
|
---|
| 14 | * Examples: -1 => 359, 361 => 1
|
---|
| 15 | */
|
---|
| 16 | export declare const clampHue: (degrees: number) => number;
|
---|
| 17 | /**
|
---|
| 18 | * Converts a hue value to degrees from 0 to 360 inclusive.
|
---|
| 19 | */
|
---|
| 20 | export declare const parseHue: (value: string, unit?: string) => number;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.