home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / midnightstrike1.swf / scripts / __Packages / com / neodelight / std / Rect.as < prev    next >
Encoding:
Text File  |  2007-04-02  |  726 b   |  34 lines

  1. class com.neodelight.std.Rect
  2. {
  3.    var p0;
  4.    var p1;
  5.    function Rect(p0, p1)
  6.    {
  7.       this.p0 = p0;
  8.       this.p1 = p1;
  9.    }
  10.    function standardize()
  11.    {
  12.       if(this.p0.x > this.p1.x)
  13.       {
  14.          var _loc2_ = this.p1.x;
  15.          this.p1.x = this.p0.x;
  16.          this.p0.x = _loc2_;
  17.       }
  18.       if(this.p0.y > this.p1.y)
  19.       {
  20.          _loc2_ = this.p1.y;
  21.          this.p1.y = this.p0.y;
  22.          this.p0.y = _loc2_;
  23.       }
  24.    }
  25.    function copyOf()
  26.    {
  27.       return new com.neodelight.std.Rect(this.p0.copyOf(),this.p1.copyOf());
  28.    }
  29.    function toString()
  30.    {
  31.       return "{x0:" + this.p0.x + ", y0:" + this.p0.y + ", x1:" + this.p1.x + ", y1:" + this.p1.y + "}";
  32.    }
  33. }
  34.