@itwin/itwinui-react
Version:
A react component library for iTwinUI
16 lines (15 loc) • 610 B
TypeScript
/**
* Return input value bounded by specified range.
*/
export declare const getBoundedValue: (val: number, min: number, max: number) => number;
/**
* Returns a random value of a given length containing `A-Za-z0-9_-` symbols.
*/
export declare const getRandomValue: (length?: number) => string;
/**
* Rounds a pixel value based on the device's pixel ratio. This ensures that values can be
* placed evenly on the device’s pixel grid, avoiding any blurring.
*
* @see https://floating-ui.com/docs/misc#subpixel-and-accelerated-positioning
*/
export declare const roundByDPR: (value: number) => number;