commit | e7fd36a8ed1cdaf939852c08835d5c6b8e0eca01 | [log] [tgz] |
---|---|---|
author | Yang Ni <yangni@google.com> | Mon Feb 01 10:42:29 2016 -0800 |
committer | Yang Ni <yangni@google.com> | Mon Feb 01 15:39:47 2016 -0800 |
tree | d3c2063a79825d5a0c6843cfbf985487ce3680da | |
parent | e961168a5f47a4ad348b6241dac26a0758980024 [diff] |
Fixed rsQuaternionAdd() implementation Bug: 26272685 We use float4 to represent a quaternion, in which a float4 q = (x,y,z,w) represents quaternion wi + xj + yk + zl. According to Wikipedia and Wolfram, the addition of two quaternions q and r should be defined as the following (q.w+r.w)i + (q.x+r.x)j + (q.y+q.y)k + (q.z+r.z)l, using the above representation of quaternions. https://en.wikipedia.org/wiki/Quaternion http://mathworld.wolfram.com/Quaternion.html Change-Id: I07837b266f51b664bed2dc50b9ff71ba375f5aaf