diff --git a/src/Vector3D.cpp b/src/Vector3D.cpp index d34daa4..ed06655 100644 --- a/src/Vector3D.cpp +++ b/src/Vector3D.cpp @@ -78,6 +78,12 @@ V3D V3D::operator*(Type scalar) const return V3D{this->x * scalar, this->y * scalar, this->z * scalar}; } +template +V3D V3D::operator/(Type scalar) const +{ + return V3D{this->x / scalar, this->y / scalar, this->z / scalar}; +} + template V3D &V3D::operator+=(const V3D &other) { diff --git a/src/Vector3D.hpp b/src/Vector3D.hpp index f0c36ce..be5f7b4 100644 --- a/src/Vector3D.hpp +++ b/src/Vector3D.hpp @@ -26,6 +26,8 @@ public: V3D operator*(Type scalar) const; + V3D operator/(Type scalar) const; + void operator=(const V3D &other); V3D &operator+=(const V3D &other);