toji/gl-matrix — pull request #131 by acerix (2014-08-30 04:22:35+00:00)
Title: fix 4th component in vec4.transformQuat output

vec4.transformQuat() does not set the 4th component of the output vector. It should be set to the 4th component of the input vector.

This request is replacing one I submitted a few months ago (https://github.com/toji/gl-matrix/pull/123) which I believe was not acceptable because of some junk in the history from a previous request of mine, so I started from a fresh clone this time.

The function can also be written like this to test that both calculations give the same result:

vec4.transformQuat = function(out, a, q) {
return vec4.transformMat4(out, a, mat4.fromQuat(mat4.create(), q));
};