There was an error while loading. Please reload this page.
1 parent a20f869 commit afd8794Copy full SHA for afd8794
1 file changed
examples/16_full_metal_app/waveform.rs
@@ -73,7 +73,6 @@ impl WaveformBuffer {
73
let start = (self.write_pos + self.samples.len() - count) % self.samples.len();
74
(0..count)
75
.map(|i| self.samples[(start + i) % self.samples.len()].abs())
76
- .max_by(|a, b| a.partial_cmp(b).unwrap())
77
- .unwrap_or(0.0)
+ .fold(0.0_f32, f32::max)
78
}
79
0 commit comments