I'm loading coordinate values with GraphichsPath.AddLine command, then drawing them and I've noticed my map is not quite accurate.
The code in question is as follows. I'm casting start and end coordinates from double to float since the command takes only float values, then multiplying them so they scale better:
GraphicsPath gp = new GraphicsPath();
gp.AddLine((float)(line.startX*10000), (float)(line.startY * 10000),
(float)(line.endX * 10000), (float)(line.endY * 10000));
For example, startX value is 15.742560625076294
but when i check the gp path data in debugger, I see it as 157425.609
. The last 7 digits are shortened. And they are crucial because the difference in meters is important in this case.
Is this the limitation of a float value as opposed to double? How can I load the full values in said command?