typhoon/tempest/vector/C3Vector.hpp

26 lines
508 B
C++
Raw Normal View History

2020-11-22 23:25:22 -06:00
#ifndef TEMPEST_VECTOR_C_3VECTOR_HPP
#define TEMPEST_VECTOR_C_3VECTOR_HPP
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)
2020-11-23 22:30:21 -06:00
, z(z) {};
2020-11-22 23:25:22 -06:00
C3Vector& operator*=(float a);
2020-11-26 10:48:52 -06:00
float Mag() const;
2020-11-26 10:59:42 -06:00
void Normalize();
2020-11-22 23:25:22 -06:00
float SquaredMag() const;
};
C3Vector operator+(const C3Vector& l, const C3Vector& r);
2020-11-22 23:25:22 -06:00
#endif