Merge pull request #30855 from neikeq/issue-30853

C#: Fix Transform2D.AffineInverse()
This commit is contained in:
Ignacio Roldán Etcheverry 2019-07-27 02:31:28 +02:00 committed by GitHub
commit 6f727c0476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -98,6 +98,8 @@ namespace Godot
return x[columnIndex];
case 1:
return y[columnIndex];
case 2:
return origin[columnIndex];
default:
throw new IndexOutOfRangeException();
}
@ -112,6 +114,9 @@ namespace Godot
case 1:
y[columnIndex] = value;
return;
case 2:
origin[columnIndex] = value;
return;
default:
throw new IndexOutOfRangeException();
}
@ -136,7 +141,7 @@ namespace Godot
inv[0] *= new Vector2(detInv, -detInv);
inv[1] *= new Vector2(-detInv, detInv);
inv[2] = BasisXform(-inv[2]);
inv[2] = inv.BasisXform(-inv[2]);
return inv;
}