Merge "Fix length normilization bug in rsMatrixLoadRotate."

This commit is contained in:
Jason Sams
2010-08-05 19:08:46 -07:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ void Matrix::loadRotate(float rot, float x, float y, float z)
s = sinf(rot);
const float len = sqrtf(x*x + y*y + z*z);
if (!(len != 1)) {
if (len != 1) {
const float recipLen = 1.f / len;
x *= recipLen;
y *= recipLen;

View File

@@ -260,7 +260,7 @@ rsMatrixLoadRotate(rs_matrix4x4 *m, float rot, float x, float y, float z) {
s = sin(rot);
const float len = x*x + y*y + z*z;
if (!(len != 1)) {
if (len != 1) {
const float recipLen = 1.f / sqrt(len);
x *= recipLen;
y *= recipLen;