Always pass on a compare function to sort
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
goog.provide('ol.geom.flat.interiorpoint');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.geom.flat.contains');
|
||||
|
||||
|
||||
@@ -40,7 +41,7 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
||||
// inside the linear ring.
|
||||
var pointX = NaN;
|
||||
var maxSegmentLength = -Infinity;
|
||||
intersections.sort();
|
||||
intersections.sort(ol.array.defaultCompare);
|
||||
x1 = intersections[0];
|
||||
for (i = 1, ii = intersections.length; i < ii; ++i) {
|
||||
x2 = intersections[i];
|
||||
|
||||
Reference in New Issue
Block a user