mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[saco] Implement and match DistanceBetweenHorizontalPoints(...)
This commit is contained in:
parent
00d60205c5
commit
7b42598f9a
@ -1527,6 +1527,18 @@ float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
float __stdcall DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2)
|
||||
{
|
||||
float fSX,fSY;
|
||||
|
||||
fSX = (x1 - x2) * (x1 - x2);
|
||||
fSY = (y1 - y2) * (y1 - y2);
|
||||
|
||||
return (float)sqrt(fSX + fSY);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------
|
||||
|
||||
float DegToRad(float fDegrees)
|
||||
{
|
||||
if (fDegrees > 360.0f || fDegrees < 0.0f) return 0.0f;
|
||||
|
@ -32,6 +32,7 @@ void __stdcall SetPlayerPedPtrRecord(BYTE bytePlayer, DWORD dwPedPtr);
|
||||
DWORD __stdcall GetPlayerPedPtrRecord(BYTE bytePlayer);
|
||||
BYTE __stdcall FindPlayerNumFromPedPtr(DWORD dwPedPtr);
|
||||
float __stdcall SquaredDistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
||||
float DistanceBetweenHorizontalPoints(float x1, float y1, float x2, float y2);
|
||||
|
||||
void GameResetRadarColors();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user