We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 192e237 commit 35bf0c7Copy full SHA for 35bf0c7
Sources/S2EdgeUtil.swift
@@ -232,7 +232,10 @@ public struct XYZPruner {
232
// it will be very small but for some large arcs (ie. from (1N,90W) to
233
// (1N,90E) the path can be wildly deformed. I did a bunch of
234
// experiments with geodesics to get safe bounds for the deformation.
235
- let approxArcLen = abs(from.x - to.x) + abs(from.y - to.y) + abs(from.z - to.z)
+ let absX = abs(from.x - to.x)
236
+ let absY = abs(from.y - to.y)
237
+ let absZ = abs(from.z - to.z)
238
+ let approxArcLen = absX + absY + absZ
239
if approxArcLen < 0.025 { // less than 2 degrees
240
maxDeformation = max(maxDeformation, approxArcLen * 0.0025)
241
} else if approxArcLen < 1.0 { // less than 90 degrees
0 commit comments