Function nalgebra::inverse_rotate [] [src]

pub fn inverse_rotate<V, M: Rotate<V>>(m: &M, v: &V) -> V

Applies an inverse 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::inverse_rotate(&t, &v);

    assert!(na::approx_eq(&tv, &Vector3::new(0.0, -1.0, 0.0)))
}Run