Fix length normilization bug in rsMatrixLoadRotate.
Change-Id: Ibdc1a64f2db6110acd971f8cacd6b1f9c09b02de
diff --git a/libs/rs/rsMatrix.cpp b/libs/rs/rsMatrix.cpp
index 2f21405..94eef13 100644
--- a/libs/rs/rsMatrix.cpp
+++ b/libs/rs/rsMatrix.cpp
@@ -73,7 +73,7 @@
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;
diff --git a/libs/rs/scriptc/rs_core.rsh b/libs/rs/scriptc/rs_core.rsh
index 01b039f..93e009a 100644
--- a/libs/rs/scriptc/rs_core.rsh
+++ b/libs/rs/scriptc/rs_core.rsh
@@ -260,7 +260,7 @@
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;