diff options
Diffstat (limited to 'src/math/vector.h')
-rw-r--r-- | src/math/vector.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/math/vector.h b/src/math/vector.h index b26c5fe..d755c89 100644 --- a/src/math/vector.h +++ b/src/math/vector.h @@ -101,6 +101,13 @@ struct Vector3 { return *this + (-other); } + constexpr Vector3 operator+=(const Vector3& other) & { + x += other.x; + y += other.y; + z += other.z; + return *this; + } + constexpr Vector3 round() { return { std::round(x), std::round(y), std::round(z) }; } |