Merge pull request #1622 from twpayne/fix-circle-containsxy

Fix bug in ol.geom.Circle#containsXY, thanks @vdubr
This commit is contained in:
Tom Payne
2014-01-30 02:49:51 -08:00

View File

@@ -72,7 +72,7 @@ ol.geom.Circle.prototype.containsXY = function(x, y) {
var dx = x - flatCoordinates[0];
var dy = y - flatCoordinates[1];
var r = flatCoordinates[this.stride] - flatCoordinates[0];
return dx * dx + dy * dy <= r;
return Math.sqrt(dx * dx + dy * dy) <= r;
};