Check to see if values are NaN in *.equals().

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1179 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-08-09 23:39:47 +00:00
parent 0b41ad2cef
commit 206e97ad0d

View File

@@ -65,7 +65,7 @@ OpenLayers.Pixel.prototype = {
var equals = false;
if (px != null) {
equals = ((this.x == px.x && this.y == px.y) ||
(isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y));
(isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y)));
}
return equals;
},
@@ -161,7 +161,7 @@ OpenLayers.Size.prototype = {
var equals = false;
if (sz != null) {
equals = ((this.w == sz.w && this.h == sz.h) ||
(isNaN(this.w) && isNaN(this.h) && isNaN(px.w) && isNaN(px.h));
(isNaN(this.w) && isNaN(this.h) && isNaN(px.w) && isNaN(px.h)));
}
return equals;
},
@@ -253,7 +253,7 @@ OpenLayers.LonLat.prototype = {
var equals = false;
if (ll != null) {
equals = ((this.lon == ll.lon) && (this.lat == ll.lat));
(isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat));
(isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
}
return equals;
},