Fixing division by zero

This commit is contained in:
Mark Sakharov 2019-10-16 23:36:02 +03:00
parent 837e333ab2
commit 95fd362857

View File

@ -890,6 +890,8 @@ static void setupSpatialGridBatchesMt(
btVector3 gridExtent = bboxMax - bboxMin;
gridExtent.setMax({btScalar(1), btScalar(1), btScalar(1)});
btVector3 gridCellSize = consExtent;
int gridDim[3];
gridDim[0] = int(1.0 + gridExtent.x() / gridCellSize.x());