Use dedicated functions to convert between degrees and radians

This commit is contained in:
Artur Wieczorek
2020-10-04 21:47:43 +02:00
parent 9e5f333bcc
commit fe064de26b
2 changed files with 10 additions and 9 deletions

View File

@@ -1338,8 +1338,8 @@ void MyCanvas::DrawSplines(wxDC& dc)
{
angle += angles[ angle_pos ];
int r = R * radii[ radius_pos ] / 100;
pts[ i ].x = center.x + (wxCoord)( r * cos( M_PI * angle / 180.0) );
pts[ i ].y = center.y + (wxCoord)( r * sin( M_PI * angle / 180.0) );
pts[ i ].x = center.x + (wxCoord)( r * cos(wxDegToRad(angle)) );
pts[ i ].y = center.y + (wxCoord)( r * sin(wxDegToRad(angle)) );
angle_pos++;
if ( angle_pos >= WXSIZEOF(angles) ) angle_pos = 0;