Implement lacking vector division operator

This commit is contained in:
Oleg Kalachev 2023-12-13 08:38:26 +03:00
parent 2c21114540
commit 997af183f0

View File

@ -37,6 +37,11 @@ public:
return Vector(x * b, y * b, z * b); return Vector(x * b, y * b, z * b);
} }
Vector operator / (const float b) const
{
return Vector(x / b, y / b, z / b);
}
Vector operator + (const Vector& b) const Vector operator + (const Vector& b) const
{ {
return Vector(x + b.x, y + b.y, z + b.z); return Vector(x + b.x, y + b.y, z + b.z);