Rect.java 465B

12345678910111213141516171819202122
  1. package com.th3rdwave.safeareacontext;
  2. /* package */ class Rect {
  3. float x;
  4. float y;
  5. float width;
  6. float height;
  7. Rect(float x, float y, float width, float height) {
  8. this.x = x;
  9. this.y = y;
  10. this.width = width;
  11. this.height = height;
  12. }
  13. boolean equalsToRect(Rect other) {
  14. if (this == other) {
  15. return true;
  16. }
  17. return this.x == other.x && this.y == other.y && this.width == other.width && this.height == other.height;
  18. }
  19. }