← Back to team overview

kicad-developers team mailing list archive

Re: 0.1 degrees

 

On 4/11/2016 2:16 AM, Lorenzo Marcantonio wrote:
> On Sat, Apr 09, 2016 at 10:37:43AM -0400, Chris Pavlina wrote:
>> Anyone mind if I go through and fix the "in 0.1 degrees" units that are all
>> over pcbnew? I don't see any reason why we can't let the user enter unit
>> degrees with a decimal point.
> 
> Probably stems for avoiding floats around the code, which is a good
> idea... we sometime went thru horrible linear algebra things to avoid
> trigonometric code and the resulting rounding issues.
> 
> If you really want to fix it I'd suggest to make a derivative entry box
> that handles it and returns the value in decidegrees. Look how the
> current 'mils/inch/mm' entry box does it to centralize the
> conversion/check.

AFIAK, the main reason for using angular deci-degrees was that undoing a
rotate command would mathematically add or subtract successive rotations
which would accumulate floating point rounding errors. I fixed that a
long time ago so that undoing a rotate command restores the previous
angle. There is no math involved in undoing rotates any more.  We also
used to have trigonometric look up tables which used deci-degrees as the
array index.  I think I ripped those out as well but it may have been
someone else who did that.

> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 


References