summaryrefslogtreecommitdiff
path: root/examples/copyrotated.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/copyrotated.c')
-rw-r--r--examples/copyrotated.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/copyrotated.c b/examples/copyrotated.c
index 03e493d..00a7003 100644
--- a/examples/copyrotated.c
+++ b/examples/copyrotated.c
@@ -60,9 +60,9 @@ int main(int argc, char **arg)
/* to radian */
a2 = angle * .0174532925;
- new_width = ceil(cos(a2) * gdImageSX(im)) +
+ new_width = fabs(ceil(cos(a2) * gdImageSX(im))) +
fabs(sin(a2) * gdImageSY(im));
- new_height = ceil(cos(a2) * gdImageSY(im)) +
+ new_height = fabs(ceil(cos(a2) * gdImageSY(im))) +
fabs(sin(a2) * gdImageSX(im));