mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 15:55:13 +08:00
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:
parent
da5ac8a951
commit
be7865e468
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user