Add equals to Rectangle

This commit is contained in:
Éric Lemoine
2013-01-22 17:03:01 +01:00
parent 234f6bc411
commit 8b83345bd2
2 changed files with 10 additions and 10 deletions

View File

@@ -41,6 +41,16 @@ ol.Rectangle = function(minX, minY, maxX, maxY) {
};
/**
* @param {ol.Rectangle} rectangle Rectangle.
* @return {boolean} Equals.
*/
ol.Rectangle.prototype.equals = function(rectangle) {
return this.minX == rectangle.minX && this.minY == rectangle.minY &&
this.maxX == rectangle.maxX && this.maxY == rectangle.maxY;
};
/**
* @param {ol.Rectangle} rectangle Rectangle.
*/