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.
*/

View File

@@ -61,16 +61,6 @@ ol.TileRange.prototype.containsTileRange = function(tileRange) {
};
/**
* @param {ol.TileRange} tileRange Tile range.
* @return {boolean} Equals.
*/
ol.TileRange.prototype.equals = function(tileRange) {
return this.minX == tileRange.minX && tileRange.maxX == this.maxX &&
this.minY == tileRange.minY && tileRange.minY == this.minY;
};
/**
* @inheritDoc
* @return {number} Height.