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