return 0 on success
parent
13d3b67822
commit
b88bedabca
|
@ -17,14 +17,14 @@ int main()
|
||||||
};
|
};
|
||||||
|
|
||||||
int res = gdAffineInvert(matrix_inv, matrix);
|
int res = gdAffineInvert(matrix_inv, matrix);
|
||||||
|
if (!res) return -1;
|
||||||
for (int i=0; i < 6; i++) {
|
for (int i=0; i < 6; i++) {
|
||||||
double rounded_res = round(matrix_inv[i] * 10);
|
double rounded_res = round(matrix_inv[i] * 10);
|
||||||
double rounded_exp = round(matrix_inv_exp[i] * 10);
|
double rounded_exp = round(matrix_inv_exp[i] * 10);
|
||||||
if (rounded_res != rounded_exp) {
|
if (rounded_res != rounded_exp) {
|
||||||
printf("%i failed %f exp %f", i, matrix_inv[i], matrix_inv_exp[i]);
|
printf("%i failed %f exp %f", i, matrix_inv[i], matrix_inv_exp[i]);
|
||||||
return -1;
|
return -i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue