mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 18:42:28 +00:00
31 lines
642 B
C++
31 lines
642 B
C++
#ifndef TEMPEST_VECTOR_C_3VECTOR_HPP
|
|
#define TEMPEST_VECTOR_C_3VECTOR_HPP
|
|
|
|
class C44Matrix;
|
|
|
|
class C3Vector {
|
|
public:
|
|
// Member variables
|
|
float x = 0.0f;
|
|
float y = 0.0f;
|
|
float z = 0.0f;
|
|
|
|
// Member functions
|
|
C3Vector() = default;
|
|
C3Vector(float x, float y, float z)
|
|
: x(x)
|
|
, y(y)
|
|
, z(z) {};
|
|
C3Vector& operator*=(float a);
|
|
float Mag() const;
|
|
void Normalize();
|
|
float SquaredMag() const;
|
|
};
|
|
|
|
C3Vector operator+(const C3Vector& l, const C3Vector& r);
|
|
|
|
C3Vector operator*(const C3Vector& l, const C44Matrix& r);
|
|
|
|
bool operator!=(const C3Vector& l, const C3Vector& r);
|
|
|
|
#endif
|