How to floor or ceil numbers? I tried to use the round
crate but either it doesn't work or I'm using it wrong.
use round::round_down;
fn main() {
println!("{}", round_down(5.5f64, 0));
}
This prints 5.5
but should print 5
.
My Cargo.toml
file contains this:
[dependencies]
round = "0.1.0"