func (v Vec2i) Add(other Vec2i) Vec2i {
	return Vec2i{v.X + other.X, v.Y + other.Y}
}
/////////////////////////////////////////////////////////////////////
Basic math operations
Add adds other vector to this one and returns result in a new vector.
package evec
import "github.com/goki/mat32"
type Vec2i struct {
	X int
	Y int
}
func NewVec2i(x, y int) Vec2i {
	return Vec2i{X: x, Y: y}
}
func NewVec2iScalar(s int) Vec2i {
	return Vec2i{X: s, Y: s}
}
func NewVec2iFmVec2Round(v mat32.Vec2) Vec2i {
	return Vec2i{int(mat32.Round(v.X)), int(mat32.Round(v.Y))}
}
func NewVec2iFmVec2Floor(v mat32.Vec2) Vec2i {
	return Vec2i{int(mat32.Floor(v.X)), int(mat32.Floor(v.Y))}
}
func NewVec2iFmVec2Ceil(v mat32.Vec2) Vec2i {
	return Vec2i{X: int(mat32.Ceil(v.X)), Y: int(mat32.Ceil(v.Y))}
}
func (v Vec2i) ToVec2() mat32.Vec2 {
	return mat32.Vec2{X: float32(v.X), Y: float32(v.Y)}
}
func (v Vec2i) IsNil() bool {
	if v.X == 0 && v.Y == 0 {
		return true
	}
	return false
}
func (v *Vec2i) Set(x, y int) {
	v.X = x
	v.Y = y
}
func (v *Vec2i) SetScalar(s int) {
	v.X = s
	v.Y = s
}
func (v *Vec2i) SetDim(dim Dims, value int) {
	switch dim {
	case X:
		v.X = value
	case Y:
		v.Y = value
	default:
		panic("dim is out of range")
	}
}
func (v Vec2i) Dim(dim Dims) int {
	switch dim {
	case X:
		return v.X
	case Y:
		return v.Y
	default:
		panic("dim is out of range")
	}
}
func (v *Vec2i) SetByName(name string, value int) {
	switch name {
	case "x", "X":
		v.X = value
	case "y", "Y":
		v.Y = value
	default:
		panic("Invalid Vec2i component name: " + name)
	}
}
func (v *Vec2i) SetZero() {
	v.SetScalar(0)
}
func (v *Vec2i) FromArray(array []int, offset int) {
	v.X = array[offset]
	v.Y = array[offset+1]
}
func (v Vec2i) ToArray(array []int, offset int) {
	array[offset] = v.X
	array[offset+1] = v.Y
}