Size2D.cs 448 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. namespace CommonUI.Gemo
  3. {
  4. public class Size2D
  5. {
  6. public float width;
  7. public float height;
  8. public Size2D() {}
  9. public Size2D(float w, float h) {
  10. width = w;
  11. height = h;
  12. }
  13. public void swap() {
  14. float temp = width;
  15. width = height;
  16. height = temp;
  17. }
  18. public bool Equals(Size2D r) {
  19. if (r != null) {
  20. return ((width == r.width) &&
  21. (height == r.height));
  22. }
  23. return false;
  24. }
  25. }
  26. }