From 997af183f0e84aaae3b2fb5a14732cbf210c044e Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 13 Dec 2023 08:38:26 +0300 Subject: [PATCH] Implement lacking vector division operator --- flix/vector.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flix/vector.h b/flix/vector.h index 577d46c..5b2df3f 100644 --- a/flix/vector.h +++ b/flix/vector.h @@ -37,6 +37,11 @@ public: 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 { return Vector(x + b.x, y + b.y, z + b.z);