Expand description
Primitive signal-normalization helpers.
The crate provides small, explicit helpers for peak normalization, mapping a signal into a target range, and removing DC offset.
§Examples
use use_signal_normalize::{center_signal, normalize_peak, normalize_range};
let normalized = normalize_peak(&[-2.0, 0.0, 1.0]).unwrap();
let centered = center_signal(&[1.0, 2.0, 3.0]).unwrap();
let ranged = normalize_range(&[0.0, 1.0], -1.0, 1.0).unwrap();
assert_eq!(normalized, vec![-1.0, 0.0, 0.5]);
assert_eq!(centered, vec![-1.0, 0.0, 1.0]);
assert_eq!(ranged, vec![-1.0, 1.0]);