From 410d8a5546d274f1d2ff1fa8b62dc28a6f897fd7 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 29 Mar 2007 14:09:12 +0000 Subject: [PATCH] cosmetisc svn path=/trunk/; revision=22194 --- app/core/gimpbrushgenerated.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/core/gimpbrushgenerated.c b/app/core/gimpbrushgenerated.c index ab68ae68ba..0e4cea1da2 100644 --- a/app/core/gimpbrushgenerated.c +++ b/app/core/gimpbrushgenerated.c @@ -360,20 +360,18 @@ gimp_brush_generated_calc (GimpBrushGenerated *brush, { for (x = -half_width; x <= half_width; x++) { - gdouble tx, ty; - gdouble angle; - gdouble d = 0.0; - - tx = c*x - s*y; - ty = fabs (s*x + c*y); + gdouble d = 0; + gdouble tx = c * x - s * y; + gdouble ty = fabs (s * x + c * y); if (spikes > 2) { - angle = atan2 (ty, tx); + gdouble angle = atan2 (ty, tx); while (angle > G_PI / spikes) { - gdouble sx = tx, sy = ty; + gdouble sx = tx; + gdouble sy = ty; tx = cs * sx - ss * sy; ty = ss * sx + cs * sy; @@ -387,7 +385,7 @@ gimp_brush_generated_calc (GimpBrushGenerated *brush, switch (shape) { case GIMP_BRUSH_GENERATED_CIRCLE: - d = sqrt (tx*tx + ty*ty); + d = sqrt (SQR (tx) + SQR (ty)); break; case GIMP_BRUSH_GENERATED_SQUARE: d = MAX (fabs (tx), fabs (ty)); @@ -411,8 +409,11 @@ gimp_brush_generated_calc (GimpBrushGenerated *brush, g_free (lookup); - if (xaxis) *xaxis = x_axis; - if (yaxis) *yaxis = y_axis; + if (xaxis) + *xaxis = x_axis; + + if (yaxis) + *yaxis = y_axis; return mask; }