using fabs
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9393
d7cf8633-e32d-0410-b094-
e92efae38249
// figure out how large a bounding box we need to properly compute this brush
maxdist = 0;
for (w = 0;w < numplanes;w++)
- maxdist = max(maxdist, planes[w].dist);
+ maxdist = max(maxdist, fabs(planes[w].dist));
// now make it large enough to enclose the entire brush, and round it off to a reasonable multiple of 1024
maxdist = floor(maxdist * (4.0 / 1024.0) + 1) * 1024.0;
for (planenum = 0, plane = planes;planenum < numplanes;planenum++, plane++)