EDA_ANGLE: use existing Normalize180 function here

This commit is contained in:
Jonathan Haas 2022-01-31 11:34:21 +01:00 committed by Seth Hillbrand
parent 14c5f744ff
commit 7b01530eca
1 changed files with 1 additions and 4 deletions

View File

@ -870,10 +870,7 @@ void PCB_DIM_ORTHOGONAL::Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aA
EDA_ANGLE angle( aAngle );
// restrict angle to -179.9 to 180.0 degrees
if( angle > ANGLE_180 )
angle -= ANGLE_360;
else if( angle <= -ANGLE_180 )
angle += ANGLE_360;
angle.Normalize180();
// adjust orientation and height to new angle
// we can only handle the cases of -90, 0, 90, 180 degrees exactly;