home *** CD-ROM | disk | FTP | other *** search
- class com.neodelight.std.Rect
- {
- var p0;
- var p1;
- function Rect(p0, p1)
- {
- this.p0 = p0;
- this.p1 = p1;
- }
- function standardize()
- {
- if(this.p0.x > this.p1.x)
- {
- var _loc2_ = this.p1.x;
- this.p1.x = this.p0.x;
- this.p0.x = _loc2_;
- }
- if(this.p0.y > this.p1.y)
- {
- _loc2_ = this.p1.y;
- this.p1.y = this.p0.y;
- this.p0.y = _loc2_;
- }
- }
- function copyOf()
- {
- return new com.neodelight.std.Rect(this.p0.copyOf(),this.p1.copyOf());
- }
- function toString()
- {
- return "{x0:" + this.p0.x + ", y0:" + this.p0.y + ", x1:" + this.p1.x + ", y1:" + this.p1.y + "}";
- }
- }
-