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
+1 -1
View File
@@ -1075,7 +1075,7 @@ void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
y0 = ClipBox->GetY();
xm = ClipBox->GetRight();
ym = ClipBox->GetBottom();
r = (int) hypot( x1 - xc, y1 - yc );
r = KiROUND( Distance( x1, y1, xc, yc ) );
if( xc < ( x0 - r ) )
return;
if( yc < ( y0 - r ) )