pub fn fround_vec(x: &[f64]) -> Vec<f32>Expand description
§fround_vec(x)
Rounding Function
The fround_vec function takes a slice of f64 values as input and returns
a Vec<f32> where each element is the f32 representation of the corresponding input element.
The fround function converts a f64 value to a f32 value.
The fround_vec function performs the same operation as the f64_to_f32_vec function.
§Examples
use mathlab::math::{fround, fround_vec};
let my_x_f64_array = [0.6666666666666666, 0.30000000000000004, 0.020000000000000004, 0.09999999999999998];
assert_eq!(fround(0.30000000000000004), 0.3);
assert_eq!(fround(0.09999999999999998), 0.1);
assert_eq!(fround_vec(&my_x_f64_array), [0.6666667, 0.3, 0.02, 0.1]);End Fun Doc