Remove antipodal test cases
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.
This commit is contained in:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user