AreaRect.cs 389 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using UnityEngine;
  3. public struct AreaRect
  4. {
  5. public AreaRect(Rect r)
  6. {
  7. this.xMin = r.xMin;
  8. this.xMax = r.xMax;
  9. this.yMin = r.yMin;
  10. this.yMax = r.yMax;
  11. }
  12. public Rect ToRect()
  13. {
  14. return Rect.MinMaxRect(this.xMin, this.yMin, this.xMax, this.yMax);
  15. }
  16. public float xMin;
  17. public float xMax;
  18. public float yMin;
  19. public float yMax;
  20. }