1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
/// Return the minimum of two values
pub(crate) fn min(v0: f64, v1: f64) -> f64 {
    if v0 < v1 {
        v0
    } else {
        v1
    }
}

/// Return the maximum of two values
pub(crate) fn max(v0: f64, v1: f64) -> f64 {
    if v0 > v1 {
        v0
    } else {
        v1
    }
}