Function vec2::transform_angle [−][src]
pub fn transform_angle<'out, T>(
out: &'out mut [T; 2],
v: &[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 = vec2::new_zero(); vec2::transform_angle(&mut v, &[0_f32, 1_f32], &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]);