1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-06-18 11:53:12 +00:00

Refactor CCullZone::CalcDistToCullZoneSquared

This commit is contained in:
Sergeanur 2020-01-20 23:27:07 +02:00
parent 7857590990
commit 06904755d9

View file

@ -507,27 +507,14 @@ float
CCullZone::CalcDistToCullZoneSquared(float x, float y)
{
float rx, ry;
float temp;
temp = minx;
if (temp <= x) {
temp = maxx;
if (x <= temp)
rx = 0.0f;
else
rx = sq(x - temp);
} else
rx = sq(x - temp);
if (x < minx) rx = sq(x - minx);
else if (x > maxx) rx = sq(x - maxx);
else rx = 0.0f;
temp = miny;
if (temp <= y) {
temp = maxy;
if (y <= temp)
ry = 0.0f;
else
ry = sq(y - temp);
} else
ry = sq(y - temp);
if (y < miny) ry = sq(y - miny);
else if (y > maxy) ry = sq(y - maxy);
else ry = 0.0f;
return rx + ry;
}