pub fn assert_all_le<T>(a: &[T], lim: T, msg: &str)where
    T: Float + Display,
Expand description

Asserts that all elements in an array are less than or equal a given value

Arguments

  • a given array of floating-point numbers
  • lim the upper bound on the array; all elements must be less than or equal to lim, otherwise the function panics
  • msg error message

Panics

The function panic if there is at least on element in a which is greater than lim