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
2 files changed