vec add fixed

This commit is contained in:
Timon Ringwald 2022-08-26 08:53:01 +02:00
parent 7adee6853e
commit 0355d2a1dd

View File

@ -31,7 +31,7 @@ func (v Vec2[N]) W() N {
} }
func (v Vec2[N]) Add(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] { func (v Vec2[N]) Add(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] {
return Vec2[N]{v.X() + o.X(), v.Y() - o.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]] { func (v Vec2[N]) Sub(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] {