use na::Real; use aliases::Qua; /// Multiplies two quaternions. pub fn cross(q1: &Qua, q2: &Qua) -> Qua { q1 * q2 } /// The scalar product of two quaternions. pub fn dot(x: &Qua, y: &Qua) -> N { x.dot(y) } /// The magnitude of the quaternion `q`. pub fn length(q: &Qua) -> N { q.norm() } /// The magnitude of the quaternion `q`. pub fn magnitude(q: &Qua) -> N { q.norm() } /// Normalizes the quaternion `q`. pub fn normalize(q: &Qua) -> Qua { q.normalize() }