Skip to main content

ensure_range

Function ensure_range 

Source
pub fn ensure_range(
    parameter: &'static str,
    value: f64,
    min: f64,
    max: f64,
) -> Result<()>
Expand description

Checks that a value is finite and within [min, max].

ยงErrors

KernelError::NotFinite for NaN or infinity; KernelError::OutOfRange outside the interval.