google / google/s2-geometry-library-java

Possible bug in compareEdges

Offen Anfängerfreundlich
#56 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
587
Forks
231
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The C++ and Java versions of `compareEdges` don't match as the C++ compare `a1` and `b1`, while the Java compare `b0` and `b1`.
I guess the C++ version is the correct one?

https://github.com/google/s2geometry/blob/fde443b85c018d2991b7459630932add72ef6f76/src/s2/s2edge_crossings.h#L63

Image

https://github.com/google/s2-geometry-library-java/blob/57151fc0f7fe543b75e9f743bf897e81928d5c3f/library/src/com/google/common/geometry/S2EdgeUtil.java#L3101

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start with compareEdges in library/src/com/google/common/geometry/S2EdgeUtil.java around line 3101, then compare it with src/s2/s2edge_crossings.h around line 63 in the referenced C++ implementation. Trace the surrounding arguments and existing tests to determine which comparison is intended; done means the Java behavior matches the verified implementation and tests pass.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, java
Bereich
computer-graphics
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
62/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.