#ifndef MATH_VECTOR_H #define MATH_VECTOR_H namespace engine::math { class Vector2 { public: float x, y; Vector2(); Vector2(float x, float y); bool operator==(Vector2 other) const; bool operator!=(Vector2 other) const; Vector2 operator+() const; Vector2 operator-() const; Vector2 operator+(Vector2 other) const; Vector2 operator-(Vector2 other) const; float det(Vector2 other) const; Vector2 round() const; }; Vector2 operator*(float n, Vector2 other); Vector2 operator*(Vector2 other, float n); Vector2 operator/(Vector2 other, float n); class Vector3 { public: float x, y, z; Vector3(); Vector3(float x, float y, float z); bool operator==(Vector3 other) const; bool operator!=(Vector3 other) const; Vector3 operator+() const; Vector3 operator-() const; Vector3 operator+(Vector3 other) const; Vector3 operator-(Vector3 other) const; Vector3 round() const; Vector2 xy() const; Vector3 cross(Vector3 other) const; }; Vector3 operator*(float n, Vector3 other); Vector3 operator*(Vector3 other, float n); Vector3 operator/(Vector3 other, float n); class Vector4 { public: float x, y, z, w; Vector4(); Vector4(float x, float y, float z, float w); Vector4(float x, float y, float z); Vector4(Vector3 v, float w); Vector4(Vector3 v); bool operator==(Vector4 other) const; bool operator!=(Vector4 other) const; Vector4 operator+() const; Vector4 operator-() const; Vector4 operator+(Vector4 other) const; Vector4 operator-(Vector4 other) const; Vector4 round() const; Vector3 xyz() const; Vector3 div_by_w() const; }; Vector4 operator*(float n, Vector4 other); Vector4 operator*(Vector4 other, float n); Vector4 operator/(Vector4 other, float n); } #endif // MATH_VECTOR_H