X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2FVector.h;h=50ae8c8de067b184e7d49888c7c31c457fd724ef;hb=4c12267c6727caa3522ac5e38b4f8c17d544ef3e;hp=958be232b74ea991f3471d9de2e5c7ef229d085c;hpb=a73a6dd63407b5f5ef5b0c635551ad27b27c95d6;p=orbi.git diff --git a/src/graphics/Vector.h b/src/graphics/Vector.h index 958be23..50ae8c8 100644 --- a/src/graphics/Vector.h +++ b/src/graphics/Vector.h @@ -198,6 +198,15 @@ constexpr Vector Norm(Vector v) { return v / Length(v); } +template +constexpr Vector MirrorX(Vector v) { + return Vector(v.x, -v.y); +} +template +constexpr Vector MirrorY(Vector v) { + return Vector(-v.x, v.y); +} + template constexpr Vector Rotate90(Vector v) { return Vector(-v.y, v.x);