mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 01:29:33 +00:00
Return zero rotation vector when converting neutral quaternion
Previously it would return nans
This commit is contained in:
parent
9229b743eb
commit
48c7135efb
@ -84,6 +84,7 @@ public:
|
||||
}
|
||||
|
||||
Vector toRotationVector() const {
|
||||
if (w == 1 && x == 0 && y == 0 && z == 0) return Vector(0, 0, 0); // neutral quaternion
|
||||
float angle;
|
||||
Vector axis;
|
||||
toAxisAngle(axis, angle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user