Browse Source

Rectangle: Added equals()

Mr.doob 9 years ago
parent
commit
e7d7a1fa58
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/math/Rectangle.js

+ 6 - 0
src/math/Rectangle.js

@@ -32,6 +32,12 @@ THREE.Rectangle.prototype = {
 
 		return this;
 
+	},
+
+	equals: function ( rectangle ) {
+
+		return this.x === rectangle.x && this.y === rectangle.y && this.width === rectangle.width && this.height === rectangle.height;
+
 	}
 
 };