Function deg_to_rad_vec

Source
pub fn deg_to_rad_vec(x: &[f64]) -> Vec<f64>
Expand description

§deg_to_rad_vec(x)

Conversion Function

The deg_to_rad_vec function takes a slice of f64 values representing angles in degrees and returns a Vec<f64> containing the corresponding angles in radians. It uses the deg_to_rad function to convert each angle from degrees to radians.

§Examples

use mathlab::math::{deg_to_rad, deg_to_rad_vec};
let my_x_f64_array = [0.0, 1.0, 30.0, 45.0, 60.0, 90.0, 180.0, 360.0, -360.0];
assert_eq!(deg_to_rad(30.0), 0.5235987756);
assert_eq!(deg_to_rad_vec(&my_x_f64_array), [0.0, 0.0174532925, 0.5235987756, 0.7853981634, 1.0471975512, 1.5707963268, 3.1415926536, 6.2831853072, -6.2831853072]);

End Fun Doc