aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorTobias Mansfield-Williams <contact@tmwhere.com>2015-09-23 17:40:30 +0100
committerTobias Mansfield-Williams <contact@tmwhere.com>2015-09-23 17:45:10 +0100
commitde72a69abaffbf4a0861018727e10befb6cec7ff (patch)
tree26b6e79752de94b2b19183f304c100831b4d1bfb /README
parent06b68f6caa214d9f98ada28db837c21e08ed2927 (diff)
downloadlinmath-de72a69abaffbf4a0861018727e10befb6cec7ff.tar.gz
linmath-de72a69abaffbf4a0861018727e10befb6cec7ff.tar.xz
linmath-de72a69abaffbf4a0861018727e10befb6cec7ff.zip
Fix bug in quat_mul_vec3 caused by reuse of u and t in 'vec3_mul_cross'
The new implementation of `quat_mul_vec3` introduced in commit 06b68f6caa214d9f98ada28db837c21e08ed2927 incorrectly calculates 't' and 'u'. The problem's caused by the variables being used as both input and output to `vec3_mul_cross`, which causes the variables to be corrupted as the cross product is taken. Unlike with the simple vector operations, input variables to vec3_mul_cross must be distinct from the output variable. ``` static inline void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b) { r[0] = a[1]*b[2] - a[2]*b[1]; r[1] = a[2]*b[0] - a[0]*b[2]; r[2] = a[0]*b[1] - a[1]*b[0]; } ```
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions