Std.Decimal.rescale
1 declaration
fn
rescale: Decimal -> Int -> DecimalThis is a callable function.
What it does
Give a value a stated scale, rounding half-even if digits must be dropped.
This is what a monetary amount is normalised through: rescale(total, 2)
says the answer is in cents and means it.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
