fn round_to_f32(num: f32, precision: u32) -> f32 {
        let base: i32 = 10;
        let factor = base.pow(precision) as f32;
        let step_one = num * factor;
        step_one / factor
    }
// returns a number rounded to the spefied
// number of decimal places
returns a number rounded to the spefied
number of decimal places
returns a number rounded to the spefied number of decimal places
fn round_to_f32(num: f32, precision: u32) -> f32 {
        let base: i32 = 10;
        let factor = base.pow(precision) as f32;
        let step_one = num * factor;
        step_one / factor
    }
fn round_to_f32 ( num : f32 , precision : u32 ) -> f32 { let base : i32 = 10 ; let factor = base . pow ( precision ) as f32 ; let step_one = num * factor ; step_one / factor }
returns a number rounded to the spefied
number of decimal places
returns a number rounded to the spefied number of decimal places
num
f32
precision
u32
num
f32
precision
u32