double b = a / 100000; b = (int) b; b *= 100000;
How the above C code is converted to Rust? Especially the line #2 that rounds the number.
To cast a float to an integer, you can use as. For example:
let b = (a / 100000.0) as i64;