mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Relax tests and remove a dead piece of code
Apparently the implementation of sin/cos changed in the recent Chrome as now the results are off by 1e-6 (compared to a different C++ implementation we generated the tests previously). It is not worth tracking down the 1e-6 error and change implementation for it.
This commit is contained in:
@@ -54,10 +54,6 @@ Tinytest.add("geojson-utils - point distance", function (test) {
|
||||
});
|
||||
|
||||
Tinytest.add("geojson-utils - points distance generated tests", function (test) {
|
||||
var floatEqual = function (a, b) {
|
||||
test.isTrue(Math.abs(a - b) < 0.000001);
|
||||
};
|
||||
|
||||
// Pairs of points we will be looking a distance between
|
||||
var tests = [[[-19.416501816827804,-13.442164216190577], [8.694866622798145,-8.511979941977188]],
|
||||
[[151.2841189110186,-56.14564002258703], [167.77983197313733,0.05544793023727834]],
|
||||
@@ -91,8 +87,8 @@ Tinytest.add("geojson-utils - points distance generated tests", function (test)
|
||||
|
||||
_.each(tests, function (pair, testN) {
|
||||
var distance = GeoJSON.pointDistance.apply(this, _.map(pair, toGeoJSONPoint));
|
||||
test.isTrue(Math.abs(distance - answers[testN]) < 0.00000001,
|
||||
"Wrong distance between points " + JSON.stringify(pair) + ": " + distance);
|
||||
test.isTrue(Math.abs(distance - answers[testN]) < 0.000001,
|
||||
"Wrong distance between points " + JSON.stringify(pair) + ": " + distance + ", " + Math.abs(distance - answers[testN]) + " differenc");
|
||||
});
|
||||
|
||||
function toGeoJSONPoint (coordinates) {
|
||||
|
||||
Reference in New Issue
Block a user