diff options
author | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
---|---|---|
committer | vimene <vincent.menegaux@gmail.com> | 2023-11-22 20:32:48 +0100 |
commit | 4558a2a704bf75266f7262f8dd41bb1c9b094e1d (patch) | |
tree | 3042dedc701d0458d5ede0a85d554ec174c61a6f /src/math_vector.h | |
parent | 6322e8d7e6e4ddb1c0a0b3a00a1b516d1a84df49 (diff) | |
download | engine-4558a2a704bf75266f7262f8dd41bb1c9b094e1d.tar.gz |
code refactoring
Diffstat (limited to 'src/math_vector.h')
-rw-r--r-- | src/math_vector.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/math_vector.h b/src/math_vector.h deleted file mode 100644 index 336c3fe..0000000 --- a/src/math_vector.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef MATH_VECTOR_H -#define MATH_VECTOR_H - -class MathVector2 { - public: - float x, y; - - MathVector2(); - MathVector2(float x, float y); - bool operator==(MathVector2 other) const; - bool operator!=(MathVector2 other) const; - MathVector2 operator+() const; - MathVector2 operator-() const; - MathVector2 operator+(MathVector2 other) const; - MathVector2 operator-(MathVector2 other) const; - float det(MathVector2 other) const; - MathVector2 round() const; -}; - -MathVector2 operator*(float n, MathVector2 other); -MathVector2 operator*(MathVector2 other, float n); -MathVector2 operator/(MathVector2 other, float n); - -class MathVector3 { - public: - float x, y, z; - - MathVector3(); - MathVector3(float x, float y, float z); - bool operator==(MathVector3 other) const; - bool operator!=(MathVector3 other) const; - MathVector3 operator+() const; - MathVector3 operator-() const; - MathVector3 operator+(MathVector3 other) const; - MathVector3 operator-(MathVector3 other) const; - MathVector3 round() const; - MathVector2 xy() const; - MathVector3 cross(MathVector3 other) const; -}; - -MathVector3 operator*(float n, MathVector3 other); -MathVector3 operator*(MathVector3 other, float n); -MathVector3 operator/(MathVector3 other, float n); - -class MathVector4 { - public: - float x, y, z, w; - - MathVector4(); - MathVector4(float x, float y, float z, float w); - MathVector4(float x, float y, float z); - MathVector4(MathVector3 v, float w); - MathVector4(MathVector3 v); - bool operator==(MathVector4 other) const; - bool operator!=(MathVector4 other) const; - MathVector4 operator+() const; - MathVector4 operator-() const; - MathVector4 operator+(MathVector4 other) const; - MathVector4 operator-(MathVector4 other) const; - MathVector4 round() const; - MathVector3 xyz() const; - MathVector3 div_by_w() const; -}; - -MathVector4 operator*(float n, MathVector4 other); -MathVector4 operator*(MathVector4 other, float n); -MathVector4 operator/(MathVector4 other, float n); - -#endif // MATH_VECTOR_H |