pointToIndex mutates the coordinates of the provided point
bjnsn opened this issue · comments
Brett Johnson commented
Mutation of the point provided as an argument to pointToIndex
causes confusing hard to track bugs. It would be helpful to either document the behavior or make the function pure.
See:
https://github.com/mhyfritz/hilbert-curve/blob/master/src/index.js#L59
https://github.com/mhyfritz/hilbert-curve/blob/master/src/index.js#L69