mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Fix comment on window scale remapping
This commit is contained in:
@@ -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| {
|
||||
|
||||
Reference in New Issue
Block a user