Fix linalg.euler_angles_from_quaternion
This commit is contained in:
1 parent
0804be5d81
commit
dd13cf637e
1 file changed
+1
-1
@@ -212,7 +212,7 @@ euler_angles_from_quaternion :: proc(q: Quaternion) -> (roll, pitch, yaw: Float)
|
|||||||
if abs(sinp) >= 1 {
|
if abs(sinp) >= 1 {
|
||||||
pitch = math.copy_sign(math.TAU * 0.25, sinp);
|
pitch = math.copy_sign(math.TAU * 0.25, sinp);
|
||||||
} else {
|
} else {
|
||||||
pitch = math.asin(sinp);
|
pitch = 2 * math.asin(sinp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// yaw, z-axis rotation
|
// yaw, z-axis rotation
|
||||||
|
|||||||
Reference in new issue
Block a user