google / google/s2-geometry-library-java

Possible bug in compareEdges

Ouverte Adaptée aux débutants
#56 1 commentaire 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
587
Forks
231
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cpp, java
Domaine
computer-graphics
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
62/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.