I went all over the documenation and lots of examples. I am basicaly trying to convert each coordinate from float to Clipper Long and after Execute I need to conver all back to floats.
So what I found is when I convert back it does not give me very acurate numbers. I need to go up to 1000 with my scale
The scale is essentially what controls the error that you see. The larger the scale you use, the less error should be observed. I tend to scale by 1E4 or more, and because I wanted accuracy more than anything else, I tend to use doubles rather than floats. You will see the range of error if you review the returned values from Clipper; you're simply shifting the decimal point when scaling down.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
I went all over the documenation and lots of examples. I am basicaly trying to convert each coordinate from float to Clipper Long and after Execute I need to conver all back to floats.
So what I found is when I convert back it does not give me very acurate numbers. I need to go up to 1000 with my scale
Here is how I do it, is it wrong?
scale declared as float
The scale is essentially what controls the error that you see. The larger the scale you use, the less error should be observed. I tend to scale by 1E4 or more, and because I wanted accuracy more than anything else, I tend to use doubles rather than floats. You will see the range of error if you review the returned values from Clipper; you're simply shifting the decimal point when scaling down.
Thank you Phil. I just thought I am casting in a wrong way