import { TimeUnit } from "../constants/time.js"; import { Axis } from "../VolumeRenderSettings.js"; export declare const DEFAULT_SIG_FIGS = 5; /** * Formats numbers for display as a string with a (hopefully) limited length. * * - If the number is an integer with 4 or fewer digits, it is returned as a string. * - If the number is a decimal, it is rounded to `sigFigs` significant figures. (default 5) * - If the number's absolute value is over 10,000 or less than 0.01, it is formatted in scientific notation to * `sciSigFigs` significant figures. (Default `sigFigs - 2`, so 3 if neither are specified. The `- 2` leaves space * for the exponential part. Remember: the purpose of this function is keeping number strings *consistently* short!) */ export declare function formatNumber(value: number, sigFigs?: number, sciSigFigs?: number): string; export declare function timeToMilliseconds(time: number, unit: TimeUnit): number; /** * Gets a timestamp formatted as `{time} / {total} {unit}`. If `unit` is a recognized * time unit, the timestamp will be formatted as a `d:hh:mm:ss.ms` string. * * @param time Current time, in specified units. * @param total Total time, in specified units. * @param unit The unit of time. * @returns A formatted timestamp string. * - If `unit` is not recognized, the timestamp will be formatted as `{time} / {total} {unit}`, * where `time` and `total` are formatted with significant digits as needed. * - If `unit` is recognized, the timestamp will be formatted as `d:hh:mm:ss.ms`, specifying * the most significant unit based on the total time, and the least significant unit with * `unit`. See `parseTimeUnit()` for recognized time units. */ export declare function getTimestamp(time: number, total: number, unit: string): string; /** * Constrains the `src` vector relative to the `target` so it only has freedom along the * specified `axis`. Does nothing if `axis = Axis.NONE`. * * @example * ``` * const src = [1, 2, 3]; * const target = [4, 5, 6]; * const constrained = constrainToAxis(src, target, Axis.X); * console.log(constrained); // [1, 5, 6] * ``` */ export declare function constrainToAxis(src: [number, number, number], target: [number, number, number], axis: Axis): [number, number, number]; export declare function getDataRange(data: ArrayLike): [number, number];