export declare const DEG_TO_RAD: number; export declare const RAD_TO_DEG: number; export declare const PI_2: number; export interface ColorTarget { r?: number; g?: number; b?: number; a?: number; rgba?: string; color?: number; color32?: number; } export interface ColorComponents { alpha: number; red: number; green: number; blue: number; a: number; r: number; g: number; b: number; } /** Converts a hexadecimal color value to RGB components. */ export declare const hex2rgb: (hex: number) => [number, number, number]; /** Converts RGB components to a hexadecimal color value. */ export declare const rgb2hex: (rgb: number[]) => number; /** Gets the next power of two greater than or equal to a value. */ export declare const getNextPowerOfTwo: (value: number) => number; /** Checks if both width and height are powers of two. */ export declare const isPowerOfTwo: (width: number, height: number) => boolean; /** Converts degrees to radians. */ export declare const degToRad: (degrees: number) => number; /** Converts radians to degrees. */ export declare const radToDeg: (radians: number) => number; /** Gets a random integer between min and max (inclusive). */ export declare const between: (min: number, max: number) => number; /** Snaps a value to the nearest multiple of gap, starting from start. */ export declare const snapToCeil: (input: number, gap?: number, start?: number) => number; /** Wraps a value within a range. */ export declare const wrap: (value: number, min: number, max: number) => number; /** Performs linear interpolation between two values. */ export declare const linear: (p0: number, p1: number, t: number) => number; /** Calculates the absolute difference between two numbers. */ export declare const difference: (a: number, b: number) => number; /** Performs linear interpolation on an array of values. */ export declare const linearInterpolation: (v: number[], k: number) => number; /** Calculates the distance between two points. */ export declare const distance: (x1: number, y1: number, x2: number, y2: number) => number; /** Checks if two numbers are within a tolerance of each other. */ export declare const within: (a: number, b: number, tolerance: number) => boolean; /** Creates a 32-bit color value from alpha, red, green, and blue components. */ export declare const getColor32: (a: number, r: number, g: number, b: number) => number; /** Creates a 24-bit color value from red, green, and blue components. */ export declare const getColor: (r: number, g: number, b: number) => number; /** Converts a hex color string to RGB components. */ export declare const hexToColor: (value: string, out: ColorTarget) => void; /** Converts a web color string (e.g. "rgb(255, 0, 0)") to RGB components with alpha. */ export declare const webToColor: (value: string, out: ColorTarget) => void; /** Extracts RGB components from a 32-bit color value. */ export declare const getRGB: (color: number) => ColorComponents; /** Converts a color value (string or number) to an object with various color formats. */ export declare const valueToColor: (value: string | number, out: ColorTarget) => ColorTarget; //# sourceMappingURL=math.d.ts.map