Skip to content
Snippets Groups Projects
Commit 57a2f2a5 authored by Andreas Rauschert's avatar Andreas Rauschert
Browse files

Add unary minus operator to vector


Signed-off-by: default avatarAndreas Rauschert <andreas.rb.rauschert@bmw.de>
parent 61e1a43a
No related branches found
No related tags found
1 merge request!21Add unary minus operator to vector
......@@ -29,6 +29,11 @@ struct Vec3
T z{0};
inline T Length() const { return units::math::sqrt((x * x) + (y * y) + (z * z)); }
inline Vec3<T> operator-() const noexcept
{
return {-x, -y, -z};
}
};
template <typename T>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment