Round a given number with a given precision. Shifts with exponential notation to avoid floating-point issues.
the number to round.
the number of decimal points.
The rounded number.
if the given number is not finite or NaN.
round(1.2345, 2);//=> 1.23round(1.2345);//=> 1 Copy
round(1.2345, 2);//=> 1.23round(1.2345);//=> 1
Generated using TypeDoc
Round a given number with a given precision. Shifts with exponential notation to avoid floating-point issues.