google / google/s2geometry

S2LatLngRect::GetCentroid test failures

Open
#523 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.7k
Forks
357
Avg merge
11h 4m
Merged PRs (30d)
1

Description

A few years ago, the comparison threshold for rect centroid splitting was increased from 1e-15 to 2e-15.

https://github.com/google/s2geometry/blob/ac448e2e939863dfefdeb6500ea74fda92d8187c/src/s2/s2latlng_rect_test.cc#L646-L649

Now I notice that the "full latitude range" tests sometimes fail with 1e-15 and need ~4/3 e-15.

https://github.com/google/s2geometry/blob/ac448e2e939863dfefdeb6500ea74fda92d8187c/src/s2/s2latlng_rect_test.cc#L684

@ericveach Do you remember if these were supposed to be rigorous, or just a small value that seemed to work?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.