Remove goog.array.binarySearch

This commit is contained in:
Nicholas L
2016-01-17 22:25:00 +13:00
parent 9bcf624382
commit ef0e95847f
2 changed files with 65 additions and 9 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
goog.provide('ol.geom.flat.interpolate');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.math');
goog.require('ol.array');
/**
@@ -46,7 +46,7 @@ ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, str
y1 = y2;
}
var target = fraction * length;
var index = goog.array.binarySearch(cumulativeLengths, target);
var index = ol.array.binarySearch(cumulativeLengths, target);
if (index < 0) {
var t = (target - cumulativeLengths[-index - 2]) /
(cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);