mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Use doubles for intermediates in the nodebuilder's FindMapBounds()
This commit is contained in:
parent
f387199442
commit
265783e1f6
1 changed files with 12 additions and 12 deletions
|
@ -609,25 +609,25 @@ void FNodeBuilder::AddSegToBBox (fixed_t bbox[4], const FPrivSeg *seg)
|
||||||
if (v2->y > bbox[BOXTOP]) bbox[BOXTOP] = v2->y;
|
if (v2->y > bbox[BOXTOP]) bbox[BOXTOP] = v2->y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FNodeBuilder::FLevel::FindMapBounds ()
|
void FNodeBuilder::FLevel::FindMapBounds()
|
||||||
{
|
{
|
||||||
fixed_t minx, maxx, miny, maxy;
|
double minx, maxx, miny, maxy;
|
||||||
|
|
||||||
minx = maxx = Vertices[0].fixX();
|
minx = maxx = Vertices[0].fX();
|
||||||
miny = maxy = Vertices[0].fixY();
|
miny = maxy = Vertices[0].fY();
|
||||||
|
|
||||||
for (int i = 1; i < NumVertices; ++i)
|
for (int i = 1; i < NumVertices; ++i)
|
||||||
{
|
{
|
||||||
if (Vertices[i].fixX() < minx) minx = Vertices[i].fixX();
|
if (Vertices[i].fX() < minx) minx = Vertices[i].fX();
|
||||||
else if (Vertices[i].fixX() > maxx) maxx = Vertices[i].fixX();
|
else if (Vertices[i].fX() > maxx) maxx = Vertices[i].fX();
|
||||||
if (Vertices[i].fixY() < miny) miny = Vertices[i].fixY();
|
if (Vertices[i].fY() < miny) miny = Vertices[i].fY();
|
||||||
else if (Vertices[i].fixY() > maxy) maxy = Vertices[i].fixY();
|
else if (Vertices[i].fY() > maxy) maxy = Vertices[i].fY();
|
||||||
}
|
}
|
||||||
|
|
||||||
MinX = minx;
|
MinX = FLOAT2FIXED(minx);
|
||||||
MinY = miny;
|
MinY = FLOAT2FIXED(miny);
|
||||||
MaxX = maxx;
|
MaxX = FLOAT2FIXED(maxx);
|
||||||
MaxY = maxy;
|
MaxY = FLOAT2FIXED(maxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
FNodeBuilder::IVertexMap::~IVertexMap()
|
FNodeBuilder::IVertexMap::~IVertexMap()
|
||||||
|
|
Loading…
Reference in a new issue