fix clippy warnings
[nihav.git] / nihav-core / src / scale / scale / mod.rs
index ae39ef33de2f1efb6bfadacb8d92fac0da5f0a13..5d0776d0ed3caf44851044315816ab6681818ce1 100644 (file)
@@ -221,8 +221,8 @@ impl LanczosResize {
         let a = order as f32;
         for i in 0..(order * 2) {
             let x = frac - ((i as f32) + 1.0 - a);
-            let fp = std::f32::consts::PI * (x as f32);
-            coeffs[i] = a * fp.sin() * (fp / a).sin() / (norm * (x as f32) * (x as f32));
+            let fp = std::f32::consts::PI * x;
+            coeffs[i] = a * fp.sin() * (fp / a).sin() / (norm * x * x);
         }
     }
     fn create_cache(order: usize, den: usize) -> Vec<Vec<f32>> {