Urara-Blog/node_modules/.pnpm-store/v3/files/8b/227f7a1a6b14ee4ab1a13efaab01796297c566d8527ca342f0fc585eb3f0a5b519a3ad43bde6fbbe44573f1a2863a1895b7be827bfbeea8d264dd26ae11b5d
2022-08-14 01:14:53 +08:00

20 lines
888 B
Text

export declare const isPresent: (value: unknown) => boolean;
export declare const round: (number: number, digits?: number, base?: number) => number;
export declare const floor: (number: number, digits?: number, base?: number) => number;
/**
* Clamps a value between an upper and lower bound.
* We use ternary operators because it makes the minified code
* is 2 times shorter then `Math.min(Math.max(a,b),c)`
* NaN is clamped to the lower bound
*/
export declare const clamp: (number: number, min?: number, max?: number) => number;
/**
* Processes and clamps a degree (angle) value properly.
* Any `NaN` or `Infinity` will be converted to `0`.
* Examples: -1 => 359, 361 => 1
*/
export declare const clampHue: (degrees: number) => number;
/**
* Converts a hue value to degrees from 0 to 360 inclusive.
*/
export declare const parseHue: (value: string, unit?: string) => number;