mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
warning when inverting a singular matrix
This commit is contained in:
parent
0f13eae87d
commit
4de6e9d3e4
@ -384,7 +384,13 @@ transmatrix inverse(const transmatrix& T) {
|
|||||||
|
|
||||||
ld d = det(T);
|
ld d = det(T);
|
||||||
transmatrix T2;
|
transmatrix T2;
|
||||||
if(d == 0) return T2;
|
if(d == 0) {
|
||||||
|
printf("Warning: inverting a singular matrix\n");
|
||||||
|
display(T);
|
||||||
|
display(T2);
|
||||||
|
T2 = Id;
|
||||||
|
return T2;
|
||||||
|
}
|
||||||
|
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
for(int j=0; j<3; j++)
|
for(int j=0; j<3; j++)
|
||||||
|
Loading…
Reference in New Issue
Block a user