1
0
Fork 0

Fix comment on window scale remapping

This commit is contained in:
Robbert van der Helm 2022-03-06 15:46:59 +01:00
parent 07cf10e81d
commit c81ec15228

View file

@ -6,7 +6,7 @@ use std::f32;
///
/// <https://en.wikipedia.org/wiki/Hann_function>
pub fn hann(size: usize) -> Vec<f32> {
// We want to scale `[0, size]` to `[0, pi]`.
// We want to scale `[0, size - 1]` to `[0, pi]`.
let scale = (size as f32 - 1.0).recip() * f32::consts::PI;
(0..size)
.map(|i| {