[gimp] app: Fix gimp_display_shell_eval_event that had some questionable whiles



commit 936df1a18346d86625b9ed0411f302c7a315bc02
Author: Alexia Death <alexiadeath gmail com>
Date:   Fri May 29 22:26:57 2009 +0300

    app: Fix gimp_display_shell_eval_event that had some questionable whiles
---
 app/display/gimpdisplayshell-coords.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/app/display/gimpdisplayshell-coords.c b/app/display/gimpdisplayshell-coords.c
index eb74eca..cf1e8f9 100644
--- a/app/display/gimpdisplayshell-coords.c
+++ b/app/display/gimpdisplayshell-coords.c
@@ -356,11 +356,7 @@ gimp_display_shell_eval_event (GimpDisplayShell *shell,
                                0.5 * shell->last_coords.direction);
         }
 
-      while (coords->direction > 1.0)
-        coords->direction -= 1.0;
-
-      while (coords->direction < 0.0)
-        coords->direction += 1.0;
+      coords->direction = coords->direction - floor(coords->direction);
 
       /* High speed -> less smooth*/
       inertia_factor *= (1 - coords->velocity);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]