fixed vec2 addition
This commit is contained in:
parent
79549c6931
commit
2da50690c9
2
vec2.go
2
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]] {
|
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]] {
|
func (v Vec2[N]) Sub(o Vec[N, Vec2[N]]) Vec[N, Vec2[N]] {
|
||||||
|
Loading…
Reference in New Issue
Block a user