I'm relatively new to the rust ecosystem and have a question about arithmetics with floats and ints:
In my scenario i is my iteration value ranging from 1 to 100 (representing the percentage of the lines I want to use). When I want to calculate the amount of lines with the percentage of i, I can do it this way:
let amount_lines = ((i as f32 / 100.0) * lines.len() as f32) as usize;
I was just wondering if there is some kind of easier way to implement this, without using the explicit typecasts all the time. Thanks already.