Move squaredDistance and squaredSegmentDistance into ol.math

This commit is contained in:
Tom Payne
2014-03-12 13:12:25 +01:00
parent 65dcc38fad
commit 6a00c14841
6 changed files with 55 additions and 53 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ goog.require('ol.geom.GeometryType');
goog.require('ol.geom.SimpleGeometry');
goog.require('ol.geom.flat');
goog.require('ol.geom.flat.deflate');
goog.require('ol.math');
@@ -39,7 +40,7 @@ ol.geom.Point.prototype.clone = function() {
ol.geom.Point.prototype.closestPointXY =
function(x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var squaredDistance = ol.geom.flat.squaredDistance(
var squaredDistance = ol.math.squaredDistance(
x, y, flatCoordinates[0], flatCoordinates[1]);
if (squaredDistance < minSquaredDistance) {
var stride = this.stride;