Subject: | matrix_transform() should use fabs() instead of abs() range checking sz |
Date: | Fri, 12 Oct 2007 12:01:20 +1000 |
To: | bug-Imager [...] rt.cpan.org |
From: | Tony Cook <tony [...] develop-help.com> |
The following in rotate.c (twice) should use fabs() instead of abs().
if (abs(sz) > 0.0000001) {
sx = (x * matrix[0] + y * matrix[1] + matrix[2]) / sz;
sy = (x * matrix[3] + y * matrix[4] + matrix[5]) / sz;
}
else {
sx = sy = 0;
}
/* anything outside these ranges is either a broken co-ordinate
or outside the source */
if (abs(sz) > 0.0000001
&& sx >= -1 && sx < src->xsize
&& sy >= -1 && sy < src->ysize) {