[saco] Implement and match InvDegToRad(...)

This commit is contained in:
RD42 2024-05-06 22:30:31 +08:00
parent 8221529e6c
commit 21d9e69510
2 changed files with 14 additions and 0 deletions

View File

@ -1467,6 +1467,18 @@ float DegToRad(float fDegrees)
//----------------------------------------------------
float InvDegToRad(float fDegrees)
{
if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f;
if (fDegrees > 180.0f) {
return (float)((-(PI - (((fDegrees - 180.0f) * PI) / 180.0f))) * -1.0f);
} else {
return (float)(((fDegrees * PI) / 180.0f) * -1.0f);
}
}
//----------------------------------------------------
bool IsNumeric(char * szString)
{
while(*szString) {

View File

@ -31,6 +31,8 @@ BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
void GameResetRadarColors();
float DegToRad(float fDegrees);
float InvDegToRad(float fDegrees);
void SaveCameraRaster(char *filename);
BOOL IsFileOrDirectoryExists(char * szPath);