pymorton icon indicating copy to clipboard operation
pymorton copied to clipboard

hash val conflict for 3D coordinate

Open DeepDuke opened this issue 2 years ago • 1 comments

Hi, thanks for this great project. It seems the hash value may conflict for larger numbers as can be seen in the following screenshot

image

DeepDuke avatar Aug 09 '23 04:08 DeepDuke

I ran into this as well with this library in the 2-dimensional space. All of these return the same position:

>>> import pymorton as pm
>>> pm.interleave2(18580409, 175926)
3366932329
>>> pm.interleave2(18645945, 175926)
3366932329
>>> pm.interleave2(18777017, 175926)
3366932329
>>> pm.interleave2(18842553, 175926)
3366932329
>>> pm.interleave2(18908089, 175926)
3366932329

minaguib avatar May 10 '24 17:05 minaguib