google / mathfu

C++ math library developed primarily for games focused on simplicity and efficiency.

Home Page:http://google.github.io/mathfu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quaternions are 32 bytes due to alignment constraints instead of 16 bytes

nfrechette opened this issue · comments

Because a Quaternion is made up of a Vector3 (16 bytes) and a float (4 bytes), alignment to will bump the size to 32 bytes. This is wasteful as a quaternion can easily and efficiently be implemented using a Vector4 (16 bytes).