summaryrefslogtreecommitdiffstats
path: root/src/math/Vector.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 00:47:33 +0200
committeraap <aap@papnet.eu>2019-05-30 00:47:33 +0200
commit0a36d49d2cd4346dc99a52155e2599917c1e6a42 (patch)
tree9d07fa357fca32b4dfa56b6f52584fdf2c349a30 /src/math/Vector.cpp
parentMerge pull request #2 from Fire-Head/master (diff)
downloadre3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.gz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.bz2
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.lz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.xz
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.tar.zst
re3-0a36d49d2cd4346dc99a52155e2599917c1e6a42.zip
Diffstat (limited to 'src/math/Vector.cpp')
-rw-r--r--src/math/Vector.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/math/Vector.cpp b/src/math/Vector.cpp
deleted file mode 100644
index d9cc590f..00000000
--- a/src/math/Vector.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include "common.h"
-#include "Vector.h"
-
-void CVector::Normalise()
-{
- float sq = MagnitudeSqr();
- if(sq > 0.0f){
- float invsqrt = 1.0f/sqrt(sq); // CMaths::RecipSqrt
- x *= invsqrt;
- y *= invsqrt;
- z *= invsqrt;
- }else
- x = 1.0f;
-}
-
-// operator +
-CVector operator + (CVector const &refLeft, CVector const &refRight)
-{
- return CVector(refLeft.x + refRight.x, refLeft.y + refRight.y, refLeft.z + refRight.z);
-}
-
-CVector operator + (CVector const &refLeft, float fRight)
-{
- return CVector(refLeft.x + fRight, refLeft.y + fRight, refLeft.z + fRight);
-}
-
-CVector operator + (float fLeft, CVector const &refRight)
-{
- return CVector(fLeft + refRight.x, fLeft + refRight.y, fLeft + refRight.z);
-}
-
-// operator -
-CVector operator - (CVector const &refLeft, CVector const &refRight)
-{
- return CVector(refLeft.x - refRight.x, refLeft.y - refRight.y, refLeft.z - refRight.z);
-}
-
-CVector operator - (CVector const &refLeft, float fRight)
-{
- return CVector(refLeft.x - fRight, refLeft.y - fRight, refLeft.z - fRight);
-}
-
-CVector operator - (float fLeft, CVector const &refRight)
-{
- return CVector(fLeft - refRight.x, fLeft - refRight.y, fLeft - refRight.z);
-}
-
-// operator *
-CVector operator * (CVector const &refLeft, CVector const &refRight)
-{
- return CVector(refLeft.x * refRight.x, refLeft.y * refRight.y, refLeft.z * refRight.z);
-}
-
-CVector operator * (CVector const &refLeft, float fRight)
-{
- return CVector(refLeft.x * fRight, refLeft.y * fRight, refLeft.z * fRight);
-}
-
-CVector operator * (float fLeft, CVector const &refRight)
-{
- return CVector(fLeft * refRight.x, fLeft * refRight.y, fLeft * refRight.z);
-}
-
-// operator /
-CVector operator / (CVector const &refLeft, CVector const &refRight)
-{
- return CVector(refLeft.x / refRight.x, refLeft.y / refRight.y, refLeft.z / refRight.z);
-}
-
-CVector operator / (CVector const &refLeft, float fRight)
-{
- return CVector(refLeft.x / fRight, refLeft.y / fRight, refLeft.z / fRight);
-}
-
-CVector operator / (float fLeft, CVector const &refRight)
-{
- return CVector(fLeft / refRight.x, fLeft / refRight.y, fLeft / refRight.z);
-} \ No newline at end of file