fix: ensure f32 usage

This commit is contained in:
MaxOhn
2024-10-11 16:24:23 +02:00
committed by tsunyoku
parent 6fb753cd9c
commit 3bb27551b9
+3 -1
View File
@@ -15,6 +15,8 @@ impl Catcher {
}
fn calculate_scale(cs: f32) -> f32 {
((1.0 - 0.7 * ((f64::from(cs) - 5.0) / 5.0)) as f32 / 2.0 * 1.0) * 2.0
((f64::from(1.0_f32) - f64::from(0.7_f32) * ((f64::from(cs) - 5.0) / 5.0)) as f32 / 2.0
* 1.0)
* 2.0
}
}