How might you write a function to map one numeric range to another in rust?
See this example in C++
i.e:
fn map_range(source: f32, from_a: f32, from_b: f32, to_a: f32, to_b: f32)->f32{
//maps "from" range to "to" range with a given precision
}
dbg!(map_range(1.0, 0.0, 10.0, 0.0, 100.0, 3))
//10.000