Angle and distances cleanup (preparing for angles in doubles)

- Removed spurious int casts (these are truncated anyway and will break
  doubles)

- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
  ArcTangente and NORMALIZE* functions where possible

- ArcTangente now returns double and handles the 0,0 case like atan2, so
  it's no longer necessary to check for it before calling

- Small functions in trigo moved as inline
This commit is contained in:
Lorenzo Marcantonio
2013-05-01 19:32:36 +02:00
parent 28f9d7f28f
commit c36ab1c6ed
56 changed files with 236 additions and 273 deletions
+3 -3
View File
@@ -433,11 +433,11 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
wxASSERT( outputFile );
wxSize size( aSize );
/* Plot as flashed. */
switch( orient )
// Plot as an aperture flash
switch( int( orient ) )
{
case 900:
case 2700: /* rotation of 90 degrees or 270 swaps dimensions */
case 2700: // rotation of 90 degrees or 270 swaps sizes
EXCHG( size.x, size.y );
// Pass through