use na::{Real, U3, UnitQuaternion, Unit}; use aliases::{Vec, Qua}; pub fn exp(q: &Qua) -> Qua { q.exp() } pub fn log(q: &Qua) -> Qua { q.ln() } pub fn pow(q: &Qua, y: N) -> Qua { q.powf(y) } pub fn rotate(q: &Qua, angle: N, axis: &Vec) -> Qua { q * UnitQuaternion::from_axis_angle(&Unit::new_normalize(*axis), angle).unwrap() } pub fn sqrt(q: &Qua) -> Qua { unimplemented!() }