diff options
| author | vassvik <mvassvik@gmail.com> | 2020-03-30 13:29:01 +0200 |
|---|---|---|
| committer | vassvik <mvassvik@gmail.com> | 2020-03-30 13:29:01 +0200 |
| commit | dd13cf637e73abecc8191b10d454bfb1e9dbe765 (patch) | |
| tree | 143c2f665b3ced7b1d752e4915cb32edd1db454b | |
| parent | 0804be5d812e728500b1489bb5cd2d0271fcf0d1 (diff) | |
Fix linalg.euler_angles_from_quaternion
| -rw-r--r-- | core/math/linalg/specific.odin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/math/linalg/specific.odin b/core/math/linalg/specific.odin index fefd7ee2b..eded381f5 100644 --- a/core/math/linalg/specific.odin +++ b/core/math/linalg/specific.odin @@ -212,7 +212,7 @@ euler_angles_from_quaternion :: proc(q: Quaternion) -> (roll, pitch, yaw: Float) if abs(sinp) >= 1 { pitch = math.copy_sign(math.TAU * 0.25, sinp); } else { - pitch = math.asin(sinp); + pitch = 2 * math.asin(sinp); } // yaw, z-axis rotation |