Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41d9825b authored by Jason Sams's avatar Jason Sams
Browse files

Fix length normilization bug in rsMatrixLoadRotate.

Change-Id: Ibdc1a64f2db6110acd971f8cacd6b1f9c09b02de
parent 1911c60a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;