diginext-utils
Version:
README.md
17 lines • 443 B
TypeScript
/**
* Rounds a number to a specified number of decimal places.
*
* @param value - The number to round
* @param decimals - Number of decimal places (default: 0)
* @returns The rounded number
*
* @example
* ```ts
* round(3.14159, 2); // 3.14
* round(3.14159, 0); // 3
* round(3.5); // 4
* round(2.735, 2); // 2.74
* ```
*/
export declare function round(value: number, decimals?: number): number;
//# sourceMappingURL=round.d.ts.map