Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

yes, there are currently two modes for internal integer math: 64 and 128 bit. (the internal int math needs larger ranges than the inputs since we work with squares etc)

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



Wouldn't most of the triangles be small, and thus computable using a smaller number of bits because coordinates can be made relative to one corner?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: