/** * Utility functions for nv-fieldslider. */ /** * Gets the number of decimal places in a number. * @param {number} num - The number to check * @returns {number} The number of decimal places */ export declare function getDecimalPlaces(num: number): number; /** * Clamp a value between min and max. * @param {number} value - The value to clamp * @param {number} min - The minimum boundary * @param {number} max - The maximum boundary * @returns {number} The clamped value */ export declare function clamp(value: number, min: number, max: number): number; /** * Calculate the percentage position of a value within a range. * @param {number} value - The value to convert to percentage * @param {number} min - The minimum value of the range * @param {number} max - The maximum value of the range * @returns {number} The percentage (0-100) */ export declare function valueToPercent(value: number, min: number, max: number): number; /** * Snap a value to the nearest step. * @param {number} value - The value to snap * @param {number} min - The minimum boundary * @param {number} max - The maximum boundary * @param {number} step - The step size * @returns {number} The snapped value */ export declare function snapToStep(value: number, min: number, max: number, step: number): number; /** * Generate tick values for the slider. * @param {number} min - The minimum value * @param {number} max - The maximum value * @param {number} step - The step size * @returns {number[]} Array of tick values */ export declare function generateTicks(min: number, max: number, step: number): number[]; /** * Snap a value to the nearest tick mark. * @param {number} value - The value to snap * @param {object[]} ticks - Array of tick objects * @returns {number} The value of the closest tick */ export declare function snapToTicks(value: number, ticks: { /** The value of the tick */ value: number; }[]): number; /** * Format a numeric value for display, preserving trailing zeros based on step precision * @param {number} value - The value to format * @param {number} step - The step size that determines decimal precision * @returns {string} Formatted value string with appropriate decimal places */ export declare function formatValueForDisplay(value: number, step: number): string;