fix for bad matrix with NaN

This commit is contained in:
Ian Curtis 2016-03-23 01:05:02 +00:00
parent 5c513445b1
commit 23172c9aec

View file

@ -279,6 +279,8 @@ void R3DShader::SetModelStates(const Model* model)
MatDet test; MatDet test;
//========== //==========
test = MatDet::notset; // happens for bad matrices with NaN
if (model->determinant < 0) { test = MatDet::negative; } if (model->determinant < 0) { test = MatDet::negative; }
else if (model->determinant > 0) { test = MatDet::positive; } else if (model->determinant > 0) { test = MatDet::positive; }
else if (model->determinant == 0) { test = MatDet::zero; } else if (model->determinant == 0) { test = MatDet::zero; }