core/dsp: document module
[nihav.git] / nihav-core / src / dsp / window.rs
index 92a26556587dff8528570bd580f795f413f64457..eb350e3ecbd319208e8b9312a90cecaad6f31358 100644 (file)
@@ -1,12 +1,20 @@
+//! Window generating functions.
 use std::f32::consts;
 
+/// Known window types.
 #[derive(Debug,Clone,Copy,PartialEq)]
 pub enum WindowType {
+    /// Simple square window.
     Square,
+    /// Simple sine window.
     Sine,
+    /// Kaiser-Bessel derived window.
     KaiserBessel(f32),
 }
 
+/// Calculates window coefficients for the requested window type and size.
+///
+/// Set `half` flag to calculate only the first half of the window.
 pub fn generate_window(mode: WindowType, scale: f32, size: usize, half: bool, dst: &mut [f32]) {
     match mode {
         WindowType::Square => {