summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2019-08-23 00:44:38 +0200
committereray orçunus <erayorcunus@gmail.com>2019-08-23 00:53:53 +0200
commite5df72a1e97af788f100c0d8bfaa842ae8bdfe7a (patch)
tree8ea09fb5f072f26005983e435e46ac70b4ecdb37 /src/math
parentMerge pull request #195 from erorcun/erorcun (diff)
downloadre3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.gz
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.bz2
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.lz
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.xz
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.tar.zst
re3-e5df72a1e97af788f100c0d8bfaa842ae8bdfe7a.zip
Diffstat (limited to 'src/math')
-rw-r--r--src/math/Matrix.h1
-rw-r--r--src/math/math.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h
index bfe85afa..7d8c02ab 100644
--- a/src/math/Matrix.h
+++ b/src/math/Matrix.h
@@ -212,6 +212,7 @@ public:
}
void SetRotate(float xAngle, float yAngle, float zAngle);
void Rotate(float x, float y, float z);
+ void RotateX(float x);
void Reorthogonalise(void);
void CopyOnlyMatrix(CMatrix *other){
diff --git a/src/math/math.cpp b/src/math/math.cpp
index e8b7d933..66260709 100644
--- a/src/math/math.cpp
+++ b/src/math/math.cpp
@@ -41,6 +41,12 @@ CMatrix::Rotate(float x, float y, float z)
}
void
+CMatrix::RotateX(float x)
+{
+ Rotate(x, 0.0f, 0.0f);
+}
+
+void
CMatrix::Reorthogonalise(void)
{
CVector &r = GetRight();