Browse Source

added set

ncannasse 11 years ago
parent
commit
23026fc471
1 changed files with 7 additions and 0 deletions
  1. 7 0
      h2d/col/Bounds.hx

+ 7 - 0
h2d/col/Bounds.hx

@@ -40,6 +40,13 @@ class Bounds {
 		if( p.y > yMax ) yMax = p.y;
 	}
 
+	public inline function set(x, y, width, height) {
+		this.x = x;
+		this.y = y;
+		this.xMax = x + width;
+		this.yMax = y + height;
+	}
+
 	public inline function setMin( p : Point ) {
 		xMin = p.x;
 		yMin = p.y;