Content deleted Content added
→xyzw order?: Reply |
→xyzw order?: Reply |
||
Line 57:
:In many contexts, quaternions are written as the sum of four parts in a specific order: the real part, the i part, the j part, and the k part. That form carries over to having the cosine be first, and is the one that I am most familiar with. If you've seen it the other way ... then there are (at least) two ways to do it. If this is a vote, I vote for having the {{math|cos}} term first. —[[User:Quantling|<span class="texhtml"><i>Q</i></span>uantling]] ([[User talk:Quantling|talk]] | [[Special:Contributions/Quantling|contribs]]) 18:19, 8 October 2024 (UTC)
::Not suggesting it be changed, just wondering if it should be noted in case somebody is looking at code that works that way. Looking at some existing code such as Pixar's math library, it looks like they are pretty careful to make the api return the real and vector parts as two different pieces, and indexing only works on the vector (ie you write quat.vector[2] to get the z, not quat[3] or quat[2]). I think though there are some tiny advantages on GPUs to storing the quaternions as xyzw so this is often done. [[User:Spitzak|Spitzak]] ([[User talk:Spitzak|talk]]) 23:56, 8 October 2024 (UTC)
|