Address TODOs

To make sure that our binarySearch implementation meets the requirements of
the library, I added more tests for ol.geom.flat.interpolate.lineString, only
to find out that it does not handle line strings with repeated vertices
properly, regardless of what binarySearch implementation is used.
This commit is contained in:
Andreas Hocevar
2016-02-02 23:17:18 +01:00
committed by Nicholas L
parent 1771df0109
commit ebc98ec1bb
3 changed files with 146 additions and 17 deletions

View File

@@ -15,6 +15,7 @@ goog.require('ol.array');
* @return {Array.<number>} Destination.
*/
ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
// FIXME does not work when vertices are repeated
// FIXME interpolate extra dimensions
goog.asserts.assert(0 <= fraction && fraction <= 1,
'fraction should be in between 0 and 1');