Advertisement
Guest User

Untitled

a guest
Feb 19th, 2022
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public class Region {
  2.  
  3. int x1, y1, z1, x2, y2, z2;
  4.  
  5. public Region(int x1, int y1, int z1, int x2, int y2, int z2) {
  6. this.x1 = x1;
  7. this.y1 = y1;
  8. this.z1 = z1;
  9. this.x2 = x2;
  10. this.y2 = y2;
  11. this.z2 = z2;
  12. }
  13.  
  14. public boolean contains(int x, int y, int z) {
  15. return (y >= this.y1 && y <= this.y2 && contains(x, z));
  16. }
  17.  
  18. public boolean contains(int x, int z) {
  19. return (x >= this.x1 && z >= this.z1 && x <= this.x2 && z <= this.z2);
  20. }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement