csx
Version:
Utility functions for TypeStyle
8 lines (7 loc) • 325 B
TypeScript
export declare const round: (x: number) => number;
/**
* Rounds a decimal by multiplying it by a factor, rounding it, and then dividing it by that same factor
* @param n number to round
* @param factor to use 100 = scale of 2, 100000 = scale of 5
*/
export declare function roundFloat(n: number, factor: number): number;