Closed christianp closed 1 year ago
At the moment, trunc(x) rounds towards zero to the nearest integer. It would be convenient to round to a given number of decimal places.
trunc(x)
trunc(x, p) should round x towards zero to p decimal places.
trunc(x, p)
x
p
At the moment,
trunc(x)
rounds towards zero to the nearest integer. It would be convenient to round to a given number of decimal places.trunc(x, p)
should roundx
towards zero top
decimal places.