@js-draw/math
Version: 
A math library for js-draw.
14 lines (13 loc) • 369 B
TypeScript
/**
 * Converts `num` to a string, removing trailing digits that were likely caused by
 * precision errors.
 *
 * @example
 * ```ts,runnable,console
 * import { toRoundedString } from '@js-draw/math';
 *
 * console.log('Rounded: ', toRoundedString(1.000000011));
 * ```
 */
export declare const toRoundedString: (num: number) => string;
export default toRoundedString;