3 ms·
Notably, 32 bit floats are insufficiently precise for representing latitudes and longitudes. I seem to recall doing the math on it, and in California the next l
by nwallin 7y ago
Notably, 32 bit floats are insufficiently precise for representing latitudes and longitudes. I seem to recall doing the math on it, and in California the next line of longitude representable by 32 bit floats was like half a mile away. Don't quote me on the number though.
32 bit integers are precise enough. If you define 180 degrees West as INT_MIN and 180 degrees East as INT_MAX your precision is about a foot.
Although 32 bit floats are precise enough in some areas of Africa because it's closer to the 0,0 point. But it'll fall down if you're anywhere else in the world.