Commit 57a2f2a5 authored by Andreas Rauschert's avatar Andreas Rauschert
Browse files

Add unary minus operator to vector


Signed-off-by: Andreas Rauschert's avatarAndreas Rauschert <andreas.rb.rauschert@bmw.de>
parent 61e1a43a
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment