UNPKG

vuestic-ui

Version:
16 lines (15 loc) 373 B
/** * Prevent floating numbers like 0.30000000000000004 * * @example * * 0.1 + 0.2 // 0.30000000000000004 * * safeFloat(0.1 + 0.2) // 0.3 */ export declare const toFloat: (num: number) => number; /** * Check if the number is divisible by the step. * Consider the floating point error. */ export declare const isDividable: (num: number, step: number) => boolean;