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:
+1
-1
@@ -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 ) )
|
||||
|
||||
Reference in New Issue
Block a user