Open nimbit-software opened 2 months ago
It would be great to have a function in the expressions for trimming decimal points. Something like this.
fn trim_decimal_places(num: f64, places: usize) -> f64 { let factor = 10_f64.powi(places as i32); (num * factor).trunc() / factor }
Is it possible to add custom functions? Or how could i contribute additional functions?
Good suggestion, we may add it to backlog, for now you can use a workaround:
2 decimals: round(5.33333333 * 100) / 100 3 decimals: round(5.33333333 * 1000) / 1000
It would be great to have a function in the expressions for trimming decimal points. Something like this.
Is it possible to add custom functions? Or how could i contribute additional functions?