[gimp] app: rename angle_mod_2PI() to normalize_angle(), there is no mod involved
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: rename angle_mod_2PI() to normalize_angle(), there is no mod involved
- Date: Sun, 25 May 2014 15:45:15 +0000 (UTC)
commit e3e743bd6b48c6a22b7f458441073b39405831e7
Author: Michael Natterer <mitch gimp org>
Date: Sun May 25 17:42:56 2014 +0200
app: rename angle_mod_2PI() to normalize_angle(), there is no mod involved
app/widgets/gimpdial.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/widgets/gimpdial.c b/app/widgets/gimpdial.c
index 873dabf..957ba8e 100644
--- a/app/widgets/gimpdial.c
+++ b/app/widgets/gimpdial.c
@@ -398,7 +398,7 @@ gimp_dial_expose_event (GtkWidget *widget,
}
static gdouble
-angle_mod_2PI (gdouble angle)
+normalize_angle (gdouble angle)
{
if (angle < 0)
return angle + 2 * G_PI;
@@ -412,8 +412,8 @@ static gdouble
get_angle_distance (gdouble alpha,
gdouble beta)
{
- return ABS (MIN (angle_mod_2PI (alpha - beta),
- 2 * G_PI - angle_mod_2PI (alpha - beta)));
+ return ABS (MIN (normalize_angle (alpha - beta),
+ 2 * G_PI - normalize_angle (alpha - beta)));
}
static gdouble
@@ -548,8 +548,8 @@ gimp_dial_motion_notify_event (GtkWidget *widget,
case DIAL_TARGET_BOTH:
g_object_set (dial,
- "alpha", angle_mod_2PI (dial->priv->alpha + delta),
- "beta", angle_mod_2PI (dial->priv->beta + delta),
+ "alpha", normalize_angle (dial->priv->alpha + delta),
+ "beta", normalize_angle (dial->priv->beta + delta),
NULL);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]