From 7f1a13361b0b0393a365c1347800cec9c7ade17d Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 24 Feb 2014 14:44:45 -0700 Subject: [PATCH] Remove antipodal test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Vincenty formula can fail to converge for antipodal points (see http://en.wikipedia.org/wiki/Vincenty's_formulae#Nearly_antipodal_points), so those test cases are removed. These tests fail with the latest V8 due to optimization of trig functions with lookup tables. For example, Math.cos(Math.PI / 2) is no longer calculated based on the value of Math.PI / 2 (which is different than the actual value of π / 2). Instead, values close to multiples of π / 2 are determined to be 0 (which is arguably what you want). Previously the tests were relying on very small numbers being returned in this case. --- test/spec/ol/ellipsoid/ellipsoid.test.js | 35 ------------------------ 1 file changed, 35 deletions(-) diff --git a/test/spec/ol/ellipsoid/ellipsoid.test.js b/test/spec/ol/ellipsoid/ellipsoid.test.js index 1952a73bdc..1573c1ec3c 100644 --- a/test/spec/ol/ellipsoid/ellipsoid.test.js +++ b/test/spec/ol/ellipsoid/ellipsoid.test.js @@ -256,27 +256,6 @@ describe('ol.Ellipsoid', function() { vincentyInitialBearing: 0, vincentyDistance: 0 }, - { - c1: [180, 90], - c2: [180, -90], - vincentyFinalBearing: 180, - vincentyInitialBearing: 180, - vincentyDistance: 20003931.458623584 - }, - { - c1: [180, 90], - c2: [-180, 90], - vincentyFinalBearing: 90, - vincentyInitialBearing: 90, - vincentyDistance: 9.565041537306137e-26 - }, - { - c1: [180, 90], - c2: [-180, 90], - vincentyFinalBearing: 90, - vincentyInitialBearing: 90, - vincentyDistance: 9.565041537306137e-26 - }, { c1: [180, -90], c2: [180, -90], @@ -284,20 +263,6 @@ describe('ol.Ellipsoid', function() { vincentyInitialBearing: 0, vincentyDistance: 0 }, - { - c1: [180, -90], - c2: [-180, 90], - vincentyFinalBearing: 7.0164775638926606e-15, - vincentyInitialBearing: 7.0164775638926606e-15, - vincentyDistance: 20003931.458623584 - }, - { - c1: [180, -90], - c2: [-180, 90], - vincentyFinalBearing: 7.0164775638926606e-15, - vincentyInitialBearing: 7.0164775638926606e-15, - vincentyDistance: 20003931.458623584 - }, { c1: [-180, 90], c2: [-180, 90],