1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:53:50 +00:00

Make ConvexHull::clip more resilient against large values.

This commit is contained in:
AnyOldName3 2018-08-17 17:47:52 +01:00
parent 987306feb9
commit dd501f4132

View file

@ -2067,6 +2067,14 @@ struct ConvexHull
++itr)
{
center += *itr;
center.x() = osg::maximum(center.x(), -DBL_MAX);
center.y() = osg::maximum(center.y(), -DBL_MAX);
center.z() = osg::maximum(center.z(), -DBL_MAX);
center.x() = osg::minimum(center.x(), DBL_MAX);
center.y() = osg::minimum(center.y(), DBL_MAX);
center.z() = osg::minimum(center.z(), DBL_MAX);
}
center /= double(intersections.size());