schrodinger / coordgenlibs

Schrodinger-developed 2D Coordinate Generation
BSD 3-Clause "New" or "Revised" License
42 stars 28 forks source link

Refactor clockwiseOrderedNeighbors() to avoid NaN SEGV from #106 #108

Closed d-b-w closed 2 years ago

d-b-w commented 2 years ago

Although the SEGV when coordinates are NaN has already been bypassed, I refactored this function when trying to understand what it did. I find this version more readable, it also happens to be more efficient (although that probably doesn't matter with 3-5 substituents).

See @greglandrum 's https://github.com/schrodinger/coordgenlibs/pull/107