Remove unused ellipsoid.vincentyDistance() method
This commit is contained in:
@@ -135,19 +135,3 @@ ol.Ellipsoid.prototype.vincenty =
|
||||
finalBearing: goog.math.toDegrees(alpha2)
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the distance from c1 to c2 using Vincenty.
|
||||
*
|
||||
* @param {ol.Coordinate} c1 Coordinate 1.
|
||||
* @param {ol.Coordinate} c2 Coordinate 1.
|
||||
* @param {number=} opt_minDeltaLambda Minimum delta lambda for convergence.
|
||||
* @param {number=} opt_maxIterations Maximum iterations.
|
||||
* @return {number} Vincenty distance.
|
||||
*/
|
||||
ol.Ellipsoid.prototype.vincentyDistance =
|
||||
function(c1, c2, opt_minDeltaLambda, opt_maxIterations) {
|
||||
var vincenty = this.vincenty(c1, c2, opt_minDeltaLambda, opt_maxIterations);
|
||||
return vincenty.distance;
|
||||
};
|
||||
|
||||
@@ -220,21 +220,6 @@ describe('ol.Ellipsoid', function() {
|
||||
|
||||
});
|
||||
|
||||
describe('vincentyDistance', function() {
|
||||
|
||||
it('returns the same distances as Chris Veness\'s reference implementation',
|
||||
function() {
|
||||
var e, i, vincentyDistance;
|
||||
for (i = 0; i < expected.length; ++i) {
|
||||
e = expected[i];
|
||||
vincentyDistance =
|
||||
ol.ellipsoid.WGS84.vincentyDistance(e.c1, e.c2, 1e-12, 100);
|
||||
expect(vincentyDistance).to.roughlyEqual(e.vincentyDistance, 1e-8);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user