mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement and match InvDegToRad(...)
This commit is contained in:
parent
8221529e6c
commit
21d9e69510
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user