Browse Source

Merge pull request #2196 from jp2masa/matrix-optimization

Removed duplicate call to GetDeterminant
pull/2201/head
Jumar Macato 8 years ago
committed by GitHub
parent
commit
7c9c79e455
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Avalonia.Visuals/Matrix.cs

6
src/Avalonia.Visuals/Matrix.cs

@ -293,13 +293,13 @@ namespace Avalonia
/// <returns>The inverted matrix.</returns>
public Matrix Invert()
{
if (GetDeterminant() == 0)
double d = GetDeterminant();
if (d == 0)
{
throw new InvalidOperationException("Transform is not invertible.");
}
double d = GetDeterminant();
return new Matrix(
_m22 / d,
-_m12 / d,

Loading…
Cancel
Save