I noticed when using this library that the directions scaled way off. After poking around a bit, I figured it was that dart uses 64-bit integers, and thus reversing the bits was failing to produce a negative integer.
I've solved this in my own code using toSigned(32) at the end of the dlng/dlat calculations, like so:
I noticed when using this library that the directions scaled way off. After poking around a bit, I figured it was that dart uses 64-bit integers, and thus reversing the bits was failing to produce a negative integer.
I've solved this in my own code using toSigned(32) at the end of the dlng/dlat calculations, like so:
int dlng = ((result & 1) == 1 ? ~(result >> 1) : (result >> 1)).toSigned(32);
Figured I'd let you know, in case you want to look into this/patch it.
Thanks for the library.