Function nalgebra::rotate
[−]
[src]
pub fn rotate<V, M: Rotate<V>>(m: &M, v: &V) -> V
Applies a rotation to a vector.
extern crate nalgebra as na; use na::{BaseFloat, Rotation3, Vector3}; fn main() { let t = Rotation3::new(Vector3::new(0.0f64, 0.0, 0.5 * <f64 as BaseFloat>::pi())); let v = Vector3::new(1.0, 0.0, 0.0); let tv = na::rotate(&t, &v); assert!(na::approx_eq(&tv, &Vector3::new(0.0, 1.0, 0.0))) }Run