Function conj

Source
pub fn conj<T>(q: Quaternion<T>) -> Quaternion<T>
where T: Float,
Expand description

Calculate the conjugate of Quaternion.

ยงExamples

let q: Quaternion<f64> = (1.0, [2.0, 3.0, 4.0]);
let q_conj = conj(q);
 
assert_eq!( q.0,    q_conj.0);
assert_eq!(-q.1[0], q_conj.1[0]);
assert_eq!(-q.1[1], q_conj.1[1]);
assert_eq!(-q.1[2], q_conj.1[2]);