From 25cd9b0ad66048c4c736ca00991b91ebff83a6f8 Mon Sep 17 00:00:00 2001 From: MFraters Date: Fri, 7 Apr 2023 15:28:08 -0700 Subject: [PATCH 1/2] Fix bug in Delaunator orient function which can cause differences between release and debug mode. --- include/delaunator-cpp/delaunator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/delaunator-cpp/delaunator.hpp b/include/delaunator-cpp/delaunator.hpp index 843b30b25..469ce614c 100644 --- a/include/delaunator-cpp/delaunator.hpp +++ b/include/delaunator-cpp/delaunator.hpp @@ -101,7 +101,7 @@ namespace WorldBuilder const double qy, const double rx, const double ry) { - return (qy - py) * (rx - qx) - (qx - px) * (ry - qy) < 0.0; + return (qy - py) * (rx - qx) - (qx - px) * (ry - qy) < -std::numeric_limits::epsilon(); } inline std::pair circumcenter( From 6ce66d1b5d454f7210c568adb78a6df19b6891b0 Mon Sep 17 00:00:00 2001 From: MFraters Date: Fri, 7 Apr 2023 16:21:05 -0700 Subject: [PATCH 2/2] update test results. --- .../continental_min_max_surface_spherical/screen-output.log | 6 +++--- .../screen-output.log | 6 +++--- .../oceanic_min_max_surface_spherical/screen-output.log | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/gwb-dat/continental_min_max_surface_spherical/screen-output.log b/tests/gwb-dat/continental_min_max_surface_spherical/screen-output.log index 48ced38c7..4dcc7f17a 100644 --- a/tests/gwb-dat/continental_min_max_surface_spherical/screen-output.log +++ b/tests/gwb-dat/continental_min_max_surface_spherical/screen-output.log @@ -115,10 +115,10 @@ 1 175 0 350e3 1761.46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 10e3 1604.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 175 2.5 40e3 1617.68 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 2.5 40e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 60e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 150e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 -1 175 2.5 250e3 1713.73 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 2.5 250e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 1 175 2.5 350e3 1761.46 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 5 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 5 10e3 1604.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -130,7 +130,7 @@ 1 175 5.07 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 7.5 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 7.5 10e3 1604.4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 175 7.5 40e3 1617.68 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 7.5 40e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 7.5 60e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 7.5 150e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 1 175 7.5 250e3 1713.73 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/gwb-dat/mantle_layer_min_max_surface_spherical/screen-output.log b/tests/gwb-dat/mantle_layer_min_max_surface_spherical/screen-output.log index 974b48e08..fdb94a40d 100644 --- a/tests/gwb-dat/mantle_layer_min_max_surface_spherical/screen-output.log +++ b/tests/gwb-dat/mantle_layer_min_max_surface_spherical/screen-output.log @@ -115,10 +115,10 @@ 1 175 0 350e3 1764.74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 10e3 1604.49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 175 2.5 40e3 1618.02 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 2.5 40e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 60e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 150e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 -1 175 2.5 250e3 1716.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 2.5 250e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31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 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 1 175 7.5 250e3 1716.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tests/gwb-dat/oceanic_min_max_surface_spherical/screen-output.log b/tests/gwb-dat/oceanic_min_max_surface_spherical/screen-output.log index 974b48e08..fdb94a40d 100644 --- a/tests/gwb-dat/oceanic_min_max_surface_spherical/screen-output.log +++ b/tests/gwb-dat/oceanic_min_max_surface_spherical/screen-output.log @@ -115,10 +115,10 @@ 1 175 0 350e3 1764.74 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 1 1600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 175 2.5 10e3 1604.49 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 175 2.5 40e3 1618.02 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 175 2.5 40e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 60e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 2.5 150e3 200 0 1 0 0 0 0 0 0 0 0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 0 0 0 0 0 0 0 0 0 +1 175 7.5 40e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 7.5 60e3 150 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 185 11 12 13 14 15 16 17 18 0.2 185 11 12 13 14 15 16 17 18 1 175 7.5 150e3 200 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 28 29 30 31 32 33 34 35 36 0.3 28 29 30 31 32 33 34 35 36 1 175 7.5 250e3 1716.01 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0