/** * Rounds numeric range facet values to a configurable number of decimal places. These utilities back * the `precision` config on the range facet components. At the default precision of `0` they behave * exactly like `Math.floor` / `Math.ceil` / `Math.round`, so existing whole-number ranges are * unaffected; a higher precision preserves the decimals returned by the Search API. * * Scaling is performed via exponential-notation strings (`0.24e2`) rather than `value * 10 ** precision` * so that floating-point representation error does not skew the result (e.g. naive `0.24 * 100` is * `24.000000000000004`, which would make a ceil-to-2-places of `0.24` incorrectly return `0.25`). This * is safe for the normal-magnitude decimals used by facet ranges (values whose string form is not * itself in exponential notation). */ /** * Rounds `value` down to `precision` decimal places (widens a range minimum). */ export declare const floorToPrecision: (value: number, precision: number) => number; /** * Rounds `value` up to `precision` decimal places (widens a range maximum). */ export declare const ceilToPrecision: (value: number, precision: number) => number; /** * Rounds `value` to the nearest `precision` decimal places. */ export declare const roundToPrecision: (value: number, precision: number) => number; /** * The `step` attribute value for a number input at the given precision (`1` at precision `0`, `0.01` at precision `2`). */ export declare const stepForPrecision: (precision: number) => number;