Fixed RenderTarget::ConvertCoords returning incorrect tiny numbers for very large views

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1415 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-02-21 22:36:45 +00:00
parent da5ac8a951
commit be7865e468

View File

@ -120,7 +120,7 @@ inline Matrix3 Matrix3::GetInverse() const
myData[3] * (myData[13] * myData[4] - myData[5] * myData[12]); myData[3] * (myData[13] * myData[4] - myData[5] * myData[12]);
// Compute the inverse if determinant is not zero // Compute the inverse if determinant is not zero
if ((det < -1E-7f) || (det > 1E-7f)) if (det != 0.f) // don't use an epsilon because the determinant may *really* be tiny
{ {
return Matrix3( (myData[15] * myData[5] - myData[7] * myData[13]) / det, return Matrix3( (myData[15] * myData[5] - myData[7] * myData[13]) / det,
-(myData[15] * myData[4] - myData[7] * myData[12]) / det, -(myData[15] * myData[4] - myData[7] * myData[12]) / det,