Skip to content

Commit

Permalink
Merge pull request #130 from mgiustina/patch-1
Browse files Browse the repository at this point in the history
Fix acos reference typo
  • Loading branch information
Calvin1602 authored Feb 19, 2024
2 parents 299bb15 + 9053173 commit c5c848f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ So essentially quaternions store a *rotation axis* and a *rotation angle*, in a

## Reading quaternions

This format is definitely less intuitive than Euler angles, but it's still readable: the xyz components match roughly the rotation axis, and w is the acos of the rotation angle (divided by 2). For instance, imagine that you see the following values in the debugger: [ 0.7 0 0 0.7 ]. x=0.7, it's bigger than y and z, so you know it's mostly a rotation around the X axis; and 2*acos(0.7) = 1.59 radians, so it's a rotation of 90°.
This format is definitely less intuitive than Euler angles, but it's still readable: the xyz components match roughly the rotation axis, and the acos of w is the rotation angle (divided by 2). For instance, imagine that you see the following values in the debugger: [ 0.7 0 0 0.7 ]. x=0.7, it's bigger than y and z, so you know it's mostly a rotation around the X axis; and 2*acos(0.7) = 1.59 radians, so it's a rotation of 90°.

Similarly, [0 0 0 1] (w=1) means that angle = 2*acos(1) = 0, so this is a `unit quaternion`, which makes no rotation at all.

Expand Down

0 comments on commit c5c848f

Please sign in to comment.