Function vec2::transform_angle_mut [−][src]
pub fn transform_angle_mut<'out, T>(
out: &'out mut [T; 2],
a: &T
) -> &'out mut [T; 2] where
T: Real,
&'a T: Mul<&'b T, Output = T>,
Example
use std::f32::consts::FRAC_PI_2; let mut v = [0_f32, 1_f32]; vec2::transform_angle_mut(&mut v, &FRAC_PI_2); let c = FRAC_PI_2.cos(); let s = FRAC_PI_2.sin(); assert_eq!(v, [0_f32 * c - 1_f32 * s, 0_f32 * s + 1_f32 * c]);