diff --git a/src/ol/extent.js b/src/ol/extent.js index c352b62b6f..304d9fc4d2 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -730,19 +730,6 @@ ol.extent.isInfinite = function(extent) { }; -/** - * @param {ol.Extent} extent Extent. - * @param {ol.Coordinate} coordinate Coordinate. - * @return {ol.Coordinate} Coordinate. - */ -ol.extent.normalize = function(extent, coordinate) { - return [ - (coordinate[0] - extent[0]) / (extent[2] - extent[0]), - (coordinate[1] - extent[1]) / (extent[3] - extent[1]) - ]; -}; - - /** * @param {ol.Extent} extent Extent. * @param {ol.Extent=} opt_extent Extent. diff --git a/test/spec/ol/extent.test.js b/test/spec/ol/extent.test.js index b8406104d8..469694cf7f 100644 --- a/test/spec/ol/extent.test.js +++ b/test/spec/ol/extent.test.js @@ -642,33 +642,6 @@ describe('ol.extent', function() { }); }); - describe('normalize', function() { - it('returns the expected coordinate', function() { - var extent = [0, 1, 2, 3]; - var coordinate; - - coordinate = ol.extent.normalize(extent, [1, 2]); - expect(coordinate[0]).to.eql(0.5); - expect(coordinate[1]).to.eql(0.5); - - coordinate = ol.extent.normalize(extent, [0, 3]); - expect(coordinate[0]).to.eql(0); - expect(coordinate[1]).to.eql(1); - - coordinate = ol.extent.normalize(extent, [2, 1]); - expect(coordinate[0]).to.eql(1); - expect(coordinate[1]).to.eql(0); - - coordinate = ol.extent.normalize(extent, [0, 0]); - expect(coordinate[0]).to.eql(0); - expect(coordinate[1]).to.eql(-0.5); - - coordinate = ol.extent.normalize(extent, [-1, 1]); - expect(coordinate[0]).to.eql(-0.5); - expect(coordinate[1]).to.eql(0); - }); - }); - describe('scaleFromCenter', function() { it('scales the extent from its center', function() { var extent = [1, 1, 3, 3];