mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 06:38:47 +00:00
Fix linalg.euler_angles_from_quaternion
This commit is contained in:
@@ -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