diff --git a/SharedLibrary/Sources/Shared/Geometry/Vec2.inl b/SharedLibrary/Sources/Shared/Geometry/Vec2.inl index 0545606..8d044d8 100644 --- a/SharedLibrary/Sources/Shared/Geometry/Vec2.inl +++ b/SharedLibrary/Sources/Shared/Geometry/Vec2.inl @@ -30,6 +30,8 @@ vec2 vec2::unit() const { template vec2 vec2::rotate(Angle angle) const { + if (isZero()) + return {}; return vec2::unit(angle + this->angle()) * magnitude(); }