Skip to content

Commit

Permalink
Implement lacking vector division operator
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Dec 13, 2023
1 parent 5cd7713 commit c156ac9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flix/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class Vector : public Printable
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);
Expand Down

0 comments on commit c156ac9

Please sign in to comment.