Impressive work. @author : I'm trying to wrap my head around the following question: are there any situations where the "int32 constraint" would be an issue? My gut feeling says that fine a grid (4B steps) is likely to generate a good enough approximation to the exact answer for general problem (64 bit float) for most cases. Am I wrong? Also: can the algorithm easily be extended to int64 ?
64bit integers works with an input coordinate range of 29,609. this is typically fine for raster image coordinates or floats that can allow for some quantization (only the triangles/edges are affected by this not the original points!)
if the input range is larger than 29,609, the algorithm switches to a 128bit implementation with a range of 1,940,470,527 which is close to, but still smaller than, what could theoretically be stored in an int32 value. hence that's why the input is currently only up to int32.
in theory it could be extended to 64bit input range but it comes with performance and portability trade-offs that currently don't seem worth it