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