[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
ATM 3D Mirror bug fix
Greetings All,
Thanks to Bob W. I found a bug in my Code, which is fixed in below release.
http://lerch.no-ip.com/atm/3d/3dX7.zip (15Kb)
If curious about the Bug, It occurred while Parsing the Sixtests Surface File, and Rounding the Diameters to a whole number. For some reason when reading the below Diameters, they were rounded as follows:
22.5 = 22
23.5 = 24
24.5 = 24
25.5 = 26
26.5 = 26
27.5 = 28
28.5 = 28
And so On, which resulted in Odd numbered diameters having a Height of 0, causing a very weird effect.
My best guess on why windows did this is:
Diam = Single Precision Floating Number, The code did a Round(Diam,0)
When Diam = 22.5 the round worked
When Diam = 23.5 it failed.
My guess is Windows interpreted 23.5 as 23.5000000001, as when I changed Diam to become a Double Precision Floating number, the problem resolved itself (Very Weird and unexpected!)
Take Care,
James Lerch
http://Lerch.yi.org/atm (My Telescope Construction Webpage)