bitshifter / glam-rs

A simple and fast linear algebra library for games and graphics
Apache License 2.0
1.5k stars 152 forks source link

Quat::from_euler truncates rotations to a single rotation #503

Closed ethereumdegen closed 5 months ago

ethereumdegen commented 5 months ago

Quat::from_euler truncates rotations to a single rotation

I need a function that is similar that DOES NOT truncate rotations to a single rotation but maintains all rotations. Please make one like this - i do not see available in bevy docs (which uses glam)

bitshifter commented 5 months ago

Could you provide an example of what you are trying to do?

bitshifter commented 5 months ago

Closing without additional info, however I'm assuming that this is about having euler angles greater than 2pi radians resulting in a quaternion that is modulo 2pi radians (e.g. a euler rotation of pi radians is the same as 3pi radians in the resulting quaternion). This is the nature of unit quaternions, they represent a rotation around an axis, the "number of rotations" from euler angles will be lost.