Rounds a number.
If one parameter is given, it's the decimal places, and a rounding function is returned:
import { round } from 'https://unpkg.com/ixfx/dist/numbers.js';const r = round(2);r(10.12355); // 10.12 Copy
import { round } from 'https://unpkg.com/ixfx/dist/numbers.js';const r = round(2);r(10.12355); // 10.12
If two parameters are given, the first is decimal places, the second the value to round.
round(2, 10.12355); // 10.12 Copy
round(2, 10.12355); // 10.12
Optional
Rounds a number.
If one parameter is given, it's the decimal places, and a rounding function is returned:
If two parameters are given, the first is decimal places, the second the value to round.
Param: decimalPlaces
Returns