bool inside(Vector2i min, Vector2i max) { if (min.X <= X && max.X >= X) { if (min.Z <= Z && max.Z >= Z) { return true; } } return false; }