Closed lulugo19 closed 3 years ago
Hey there! I know it's been a long time since you asked this question, but for anyone else looking for the answer to this, you can use the from
method on Euler
, eg:
let quaternion = Quaternion::from(Euler::new(Deg(90.0), Deg(0.0), Deg(0.0)));
let euler = Euler::from(quaternion);
I've found the tests
directory to be a good source of "how do I do x with cgmath?" answers, especially this one. 😉
I can't find a conversion form 'Euler' to 'Quaternion'. I version 0.9.1 there is a 'to_euler' method but not in the later versions. see here: https://docs.rs/cgmath/0.9.1/cgmath/struct.Quaternion.html#method.to_euler