Files
oxydsp/oxydsp-dsp/src/lib.rs
2026-03-26 10:44:46 +01:00

12 lines
225 B
Rust

use num::Float;
pub mod blocks;
pub mod filtering;
pub mod synthesis;
pub mod units;
pub fn map<T: Float>(x: T, x_min: T, x_max: T, o_min: T, o_max: T) -> T
{
((x - x_min) / (x_max - x_min)) * (o_max - o_min) + o_min
}