Skip to main content

ratio

Function ratio 

Source
pub fn ratio(left: f32, right: f32) -> f32
Expand description

The absolute left/right ratio of two non-negative magnitudes, -1..=1, negative to the left.

The one place the floor is applied, so the whole-mix field and the per-band one cannot disagree about what silence reads: exactly 0 when the larger of the two sits below WAVE_FLOOR, rather than a ratio of noise. The division itself is floored as well as guarded, so it is total even if the guard above it ever moves.