Browse Source

fix 3d vector rotation around z axis

Kolja Strohm 1 year ago
parent
commit
a46aad7d51
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Vec3.h

+ 2 - 1
Vec3.h

@@ -207,8 +207,9 @@ namespace Framework
             const float cosTheta = lowPrecisionCos( radian );
             const float sinTheta = lowPrecisionSin( radian );
             float x = cosTheta * this->x + -sinTheta * this->y;
+            float y = sinTheta * this->x + cosTheta * this->y;
             this->x = (T)x;
-            this->z = (T)z;
+            this->y = (T)y;
             return *this;
         }
     };