pub fn rad_to_deg_vec(x: &[f64]) -> Vec<f64>
Expand description
§rad_to_deg_vec(x)
Conversion Function
The rad_to_deg_vec
function takes a slice of f64
values
representing angles
in radians
and returns a Vec<f64>
containing the corresponding angles
in degrees
.
It uses the rad_to_deg
function to convert each angle
from radians
to degrees
.
§Examples
use mathlab::math::{rad_to_deg, rad_to_deg_vec};
let my_x_f64_array = [0.0, 0.0174532925, 0.5235987756, 0.7853981634, 1.0471975512, 1.5707963268, 3.1415926536, 6.2831853072, -6.2831853072];
assert_eq!(rad_to_deg(0.5235987756), 30.0);
assert_eq!(rad_to_deg_vec(&my_x_f64_array), [0.0, 1.0, 30.0, 45.0, 60.0, 90.0, 180.0, 360.0, -360.0]);
End Fun Doc