Remove a wxPoint dependence in trigo

This commit is contained in:
Marek Roszko 2022-01-04 23:22:12 -05:00
parent bf38cb56b7
commit 6d2fd17a39
1 changed files with 6 additions and 5 deletions

View File

@ -294,13 +294,14 @@ void RotatePoint( wxPoint* point, const wxPoint& centre, double angle )
void RotatePoint( VECTOR2I& point, const VECTOR2I& centre, double angle )
{
wxPoint c( centre.x, centre.y );
wxPoint p( point.x, point.y );
int ox, oy;
RotatePoint(&p, c, angle);
ox = point.x - centre.x;
oy = point.y - centre.y;
point.x = p.x;
point.y = p.y;
RotatePoint( &ox, &oy, angle );
point.x = ox + centre.x;
point.y = oy + centre.y;
}