From 7adee6853e018a57c1bc0830c94d26c25e81c302 Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Tue, 23 Aug 2022 21:48:46 +0200 Subject: [PATCH] fixed vec2 addition --- vec2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vec2.go b/vec2.go index 3b00907..8b59d01 100644 --- a/vec2.go +++ b/vec2.go @@ -31,7 +31,7 @@ func (v Vec2[N]) W() N { } func (v Vec2[N]) Add(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] { - return Vec2[N]{v.X() + o.X(), v.Y()} + return Vec2[N]{v.X() + o.X(), v.Y() - o.Y()} } func (v Vec2[N]) Sub(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] {