mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
--- src/s2/s2edge_crossings.cc.orig 2023-04-28 23:28:39.000000000 +0800
|
|||
|
|
+++ src/s2/s2edge_crossings.cc 2023-05-18 18:05:32.000000000 +0800
|
||
|
|
@@ -116,7 +116,7 @@
|
||
|
|
// "a" and "b" are closer than about 18 * DBL_ERR == 9 * DBL_EPSILON.
|
||
|
|
// (80-bit precision can handle inputs as close as 2.5 * LDBL_EPSILON.)
|
||
|
|
constexpr T T_ERR = rounding_epsilon<T>();
|
||
|
|
- constexpr T kMinNorm =
|
||
|
|
+ const T kMinNorm =
|
||
|
|
(32 * kSqrt3 * DBL_ERR) /
|
||
|
|
(kRobustCrossProdError.radians() / T_ERR - (1 + 2 * kSqrt3));
|
||
|
|
|
||
|
|
@@ -459,7 +459,7 @@
|
||
|
|
|
||
|
|
constexpr T T_ERR = rounding_epsilon<T>();
|
||
|
|
constexpr T kMinNormalLength = (16 * kSqrt3 + 24) * DBL_ERR;
|
||
|
|
- constexpr T kMinResultLen =
|
||
|
|
+ const T kMinResultLen =
|
||
|
|
12 / (kIntersectionError.radians() / T_ERR - (2 + 2 * kSqrt3));
|
||
|
|
|
||
|
|
// On some platforms "long double" is the same as "double", and on these
|
||
|
|
|
||
|
|
--- src/s2/s2predicates.cc.orig 2023-04-28 23:28:39.000000000 +0800
|
||
|
|
+++ src/s2/s2predicates.cc 2023-05-19 01:05:41.000000000 +0800
|
||
|
|
@@ -932,7 +932,7 @@
|
||
|
|
// Reference:
|
||
|
|
// Error Estimation Of Floating-Point Summation And Dot Product, Rump
|
||
|
|
// 2011
|
||
|
|
- constexpr T kMaxError = 3.046875 * std::numeric_limits<T>::epsilon();
|
||
|
|
+ const T kMaxError = 3.046875 * std::numeric_limits<T>::epsilon();
|
||
|
|
|
||
|
|
T na = a.DotProd(b);
|
||
|
|
if (std::fabs(na) <= kMaxError) return 0;
|