X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgeometry%2FVector.h;h=562648b6b0f5013286f936537c1675c22cd6f917;hb=a8fdd58e31c27a2de9649a1bf29389f4f3e4cb7c;hp=bf647136ddfaa101ee8406b0f8fa36cdccf2a4b4;hpb=0542849dfccfec1ce1477265fa0fee2401a8fb23;p=l2e.git diff --git a/src/geometry/Vector.h b/src/geometry/Vector.h index bf64713..562648b 100644 --- a/src/geometry/Vector.h +++ b/src/geometry/Vector.h @@ -37,21 +37,37 @@ template inline Vector operator +(const Vector &lhs, const Vector &rhs) { return Vector(lhs.X() + rhs.X(), lhs.Y() + rhs.Y()); } +template +inline Vector operator +(const Vector &lhs, const Vector &rhs) { + return Vector(lhs.X() + rhs.X(), lhs.Y() + rhs.Y()); +} template inline Vector &operator +=(Vector &lhs, const Vector &rhs) { return lhs = lhs + rhs; } +template +inline Vector &operator +=(Vector &lhs, const Vector &rhs) { + return lhs = lhs + rhs; +} template inline Vector operator -(const Vector &lhs, const Vector &rhs) { return Vector(lhs.X() - rhs.X(), lhs.Y() - rhs.Y()); } +template +inline Vector operator -(const Vector &lhs, const Vector &rhs) { + return Vector(lhs.X() - rhs.X(), lhs.Y() - rhs.Y()); +} template inline Vector &operator -=(Vector &lhs, const Vector &rhs) { return lhs = lhs - rhs; } +template +inline Vector &operator -=(Vector &lhs, const Vector &rhs) { + return lhs = lhs - rhs; +} template inline Vector operator -(const Vector &v) {