Move squaredDistance and squaredSegmentDistance into ol.math
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user