mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: more variable renames (XZY -> XYZ)
No logic was changed in this commit.
This commit is contained in:
parent
f01e7ae55a
commit
d2b1b21183
@ -185,14 +185,14 @@ static void walkContour(int x, int y, int i,
|
||||
|
||||
static float distancePtSeg(const int x, const int y,
|
||||
const int px, const int py,
|
||||
const int qx, const int qz)
|
||||
const int qx, const int qy)
|
||||
{
|
||||
float pqx = (float)(qx - px);
|
||||
float pqz = (float)(qz - py);
|
||||
float pqy = (float)(qy - py);
|
||||
float dx = (float)(x - px);
|
||||
float dy = (float)(y - py);
|
||||
float d = pqx*pqx + pqz*pqz;
|
||||
float t = pqx*dx + pqz*dy;
|
||||
float d = pqx*pqx + pqy*pqy;
|
||||
float t = pqx*dx + pqy*dy;
|
||||
if (d > 0)
|
||||
t /= d;
|
||||
if (t < 0)
|
||||
@ -201,7 +201,7 @@ static float distancePtSeg(const int x, const int y,
|
||||
t = 1;
|
||||
|
||||
dx = px + t*pqx - x;
|
||||
dy = py + t*pqz - y;
|
||||
dy = py + t*pqy - y;
|
||||
|
||||
return dx*dx + dy*dy;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user