use-signal-normalize 0.0.1

Primitive normalization helpers for signal slices
Documentation
  • Coverage
  • 11.11%
    1 out of 9 items documented1 out of 6 items with examples
  • Size
  • Source code size: 6.36 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 336.38 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-signal
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

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]);