autoeq-optim 0.5.58

AutoEQ objectives, constraints, and optimizer backends
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub(super) fn db_from_ratio(ratio: f64) -> f64 {
    if ratio <= 1e-24 {
        -240.0
    } else {
        20.0 * ratio.log10()
    }
}

pub(super) fn db_from_energy_ratio(ratio: f64) -> f64 {
    if ratio <= 1e-24 {
        -240.0
    } else {
        10.0 * ratio.log10()
    }
}