check_finite

Function check_finite 

Source
pub fn check_finite<T, S>(value: T, name: S) -> CoreResult<T>
where T: Float + Display + Copy, S: Into<String>,
Expand description

Checks if a floating-point value is finite

§Arguments

  • value - The value to check
  • name - The name of the parameter being checked

§Returns

  • Ok(value) if the value is finite
  • Err(CoreError::ValueError) if the value is not finite

§Errors

Returns CoreError::ValueError if the value is not finite.