use crate::RealNumber; use crate::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) -> T { x.dot(y) } /// The magnitude of the quaternion `q`. pub fn quat_length(q: &Qua) -> T { q.norm() } /// The magnitude of the quaternion `q`. pub fn quat_magnitude(q: &Qua) -> T { q.norm() } /// Normalizes the quaternion `q`. pub fn quat_normalize(q: &Qua) -> Qua { q.normalize() }