Round a value to the given number of decimal digits. If no decimal value is present, no rounding occurs.
import {round} from '@augment-vir/common';// `result1` is `5.13`const result1 = round(5.125, {digits: 2});// `result2` is `5`const result2 = round(25, {digits: 2}); Copy
import {round} from '@augment-vir/common';// `result1` is `5.13`const result1 = round(5.125, {digits: 2});// `result2` is `5`const result2 = round(25, {digits: 2});
@augment-vir/common
Round a value to the given number of decimal digits. If no decimal value is present, no rounding occurs.