Replace 3.14159265f with 'pi' from math.h

This commit is contained in:
Alexander Akulich 2022-06-10 12:30:57 +03:00
parent 9db49d9f74
commit 0d72b62daf
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@ void FillTmpTileSpeedup(SGraphicTile *pTmpTile, SGraphicTileTexureCoords *pTmpTe
} }
//same as in rotate from Graphics() //same as in rotate from Graphics()
float Angle = (float)AngleRotate * (3.14159265f / 180.0f); float Angle = (float)AngleRotate * (pi / 180.0f);
float c = cosf(Angle); float c = cosf(Angle);
float s = sinf(Angle); float s = sinf(Angle);
float xR, yR; float xR, yR;

View file

@ -512,7 +512,7 @@ void CRenderTools::RenderSpeedupOverlay(CSpeedupTile *pSpeedup, int w, int h, fl
Graphics()->SetColor(255.0f, 255.0f, 255.0f, Alpha); Graphics()->SetColor(255.0f, 255.0f, 255.0f, Alpha);
SelectSprite(SPRITE_SPEEDUP_ARROW); SelectSprite(SPRITE_SPEEDUP_ARROW);
Graphics()->QuadsSetRotation(pSpeedup[c].m_Angle * (3.14159265f / 180.0f)); Graphics()->QuadsSetRotation(pSpeedup[c].m_Angle * (pi / 180.0f));
DrawSprite(mx * Scale + 16, my * Scale + 16, 35.0f); DrawSprite(mx * Scale + 16, my * Scale + 16, 35.0f);
Graphics()->QuadsEnd(); Graphics()->QuadsEnd();