[gimp] Bug #666751: Replace M_PI with G_PI
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug #666751: Replace M_PI with G_PI
- Date: Fri, 23 Dec 2011 09:37:05 +0000 (UTC)
commit e046056059817884c3baa9043c8c568233621e0f
Author: Mukund Sivaraman <muks banu com>
Date: Fri Dec 23 14:47:34 2011 +0530
Bug #666751: Replace M_PI with G_PI
app/gegl/gimpoperationcagecoefcalc.c | 6 +++---
plug-ins/imagemap/imap_main.c | 2 +-
plug-ins/lighting/lighting-preview.c | 4 ++--
plug-ins/map-object/map-object-preview.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/gegl/gimpoperationcagecoefcalc.c b/app/gegl/gimpoperationcagecoefcalc.c
index e1700b0..30e8c9e 100644
--- a/app/gegl/gimpoperationcagecoefcalc.c
+++ b/app/gegl/gimpoperationcagecoefcalc.c
@@ -255,7 +255,7 @@ gimp_operation_cage_coef_calc_process (GeglOperation *operation,
L10 = L1 - L0;
/* edge coef */
- coef[j + n_cage_vertices] = (-absa / (4.0 * M_PI)) * ((4.0*S-(R*R)/Q) * A10 + (R / (2.0 * Q)) * L10 + L1 - 2.0);
+ coef[j + n_cage_vertices] = (-absa / (4.0 * G_PI)) * ((4.0*S-(R*R)/Q) * A10 + (R / (2.0 * Q)) * L10 + L1 - 2.0);
if (isnan(coef[j + n_cage_vertices]))
{
@@ -265,8 +265,8 @@ gimp_operation_cage_coef_calc_process (GeglOperation *operation,
/* vertice coef */
if (!gimp_operation_cage_coef_calc_is_on_straight (&v1, &v2, &p))
{
- coef[j] += (BA / (2.0 * M_PI)) * (L10 /(2.0*Q) - A10 * (2.0 + R / Q));
- coef[(j+1)%n_cage_vertices] -= (BA / (2.0 * M_PI)) * (L10 / (2.0 * Q) - A10 * (R / Q));
+ coef[j] += (BA / (2.0 * G_PI)) * (L10 /(2.0*Q) - A10 * (2.0 + R / Q));
+ coef[(j+1)%n_cage_vertices] -= (BA / (2.0 * G_PI)) * (L10 / (2.0 * Q) - A10 * (R / Q));
}
last = current;
diff --git a/plug-ins/imagemap/imap_main.c b/plug-ins/imagemap/imap_main.c
index 65514bf..d944ab4 100644
--- a/plug-ins/imagemap/imap_main.c
+++ b/plug-ins/imagemap/imap_main.c
@@ -326,7 +326,7 @@ draw_rectangle(cairo_t *cr, gboolean filled, gint x, gint y,
void
draw_circle(cairo_t *cr, gint x, gint y, gint r)
{
- cairo_arc (cr, ZOOMED (x), ZOOMED (y), ZOOMED (r), 0., 2 * M_PI);
+ cairo_arc (cr, ZOOMED (x), ZOOMED (y), ZOOMED (r), 0., 2 * G_PI);
cairo_stroke (cr);
}
diff --git a/plug-ins/lighting/lighting-preview.c b/plug-ins/lighting/lighting-preview.c
index f3c5dc3..e1319de 100644
--- a/plug-ins/lighting/lighting-preview.c
+++ b/plug-ins/lighting/lighting-preview.c
@@ -315,12 +315,12 @@ draw_handles (void)
case POINT_LIGHT:
case SPOT_LIGHT:
cairo_arc (cr, handle_xpos, handle_ypos,
- LIGHT_SYMBOL_SIZE/2, 0, 2 * M_PI);
+ LIGHT_SYMBOL_SIZE/2, 0, 2 * G_PI);
cairo_fill (cr);
break;
case DIRECTIONAL_LIGHT:
cairo_arc (cr, handle_xpos, handle_ypos,
- LIGHT_SYMBOL_SIZE/2, 0, 2 * M_PI);
+ LIGHT_SYMBOL_SIZE/2, 0, 2 * G_PI);
cairo_fill (cr);
cairo_move_to (cr, handle_xpos, handle_ypos);
cairo_line_to (cr, startx + pw/2, starty + ph/2);
diff --git a/plug-ins/map-object/map-object-preview.c b/plug-ins/map-object/map-object-preview.c
index c270745..d9a20b1 100644
--- a/plug-ins/map-object/map-object-preview.c
+++ b/plug-ins/map-object/map-object-preview.c
@@ -225,7 +225,7 @@ draw_light_marker (cairo_t *cr,
lightx = xpos;
lighty = ypos;
- cairo_arc (cr, lightx, lighty, 7, 0, 2 * M_PI);
+ cairo_arc (cr, lightx, lighty, 7, 0, 2 * G_PI);
cairo_fill (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]