export declare function isCloseTo(number: number, comparator: number, epsilon?: number): boolean; export declare function round(number: number, precision: number): number; /** * Rounds a number to a given number of decimal places. * * Unlike {@link round} (which rounds to an integer before applying precision), * this rounds to the requested decimal precision, e.g. * `roundToPrecision({ value: 1.2345, precision: 2 })` → `1.23`. */ export declare function roundToPrecision({ value, precision, }: { value: number; precision: number; }): number; export declare function clamp(number: number, minimum: number, maximum: number): number; export declare function parseInteger(value: string | number): number; export declare function parseIntegerOrDefault(value: string, defaultValue: number): number; export declare function parseFloat(value: string | number): number; export declare function parseFloatOrNull(value: string | null | undefined): number | null; /** * Converts cents to dollars. * Commonly used for payment processor APIs (Stripe, Dub, etc.) that return amounts in cents. * * @param cents - Amount in cents * @returns Amount in dollars * * @example * centsToDollars(12345) // 123.45 * centsToDollars(5000) // 50 * centsToDollars(0) // 0 */ export declare function centsToDollars(cents: number): number; /** * @returns Distance between two points */ export declare function distance(x1: number, y1: number, x2: number, y2: number): number; export declare function formatWithCommasAndTwoDecimals(num: number | undefined, shouldShowDecimals: boolean): string; export declare function randomBigNumber(): number; export declare function randomN(i: number): number; export declare function randomBigString(): string; /** * Given a current value and a previous value, calculate the percentage change * from the previous value to the current value. */ export declare function calculatePercentageChange(current: number, previous: number): number | null; /** * Format bytes into a human readable string, favoring the largest unit possible. * * @param bytes - The number of bytes (can be a number or numeric string) * @returns Human readable string (e.g., "1.50 GB", "256.00 MB", "1024 bytes") * * @example * formatBytes(1536) // "1.50 KB" * formatBytes(1048576) // "1.00 MB" * formatBytes("1073741824") // "1.00 GB" */ export declare function formatBytes(bytes: number | string): string;