Current definition:

convert_from_iu.h:        #define MM_PER_IU   1.0 / 1e5         // Gerbview 
uses 10 micrometer.
convert_from_iu.h:        #define MM_PER_IU   1.0 / 1e6         // Pcbnew in 
nanometers.

The current definition should be enclosed in () to ensure correct 
interpretation when dividing.

X / MM_PER_IU  = X / 1.0 / 1e6 = X / 1e6 (wrong - user wants X * 1e6)

Forms for acceptable definitions:

#define MM_PER_IU 1e-5
#define MM_PER_IU ( 1.0 / 1e5 )


I didn't look into usage throughout the code - correcting the definition might 
break some things which currently work by accident.

- Cirilo


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to