[gnome-terminal] Simplify rounding



commit 177e96167ffe0a8c2e8ed049b47e4dc9030a9beb
Author: Christian Persch <chpe gnome org>
Date:   Sun Feb 21 15:55:17 2010 +0100

    Simplify rounding
    
    Makes linking to -lm obsolete.

 src/profile-editor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 8073a4b..7af7b91 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -531,7 +531,7 @@ format_percent_value (GtkScale *scale,
                       double    val,
                       void     *data)
 {
-  return g_strdup_printf ("%d%%", (int) rint (val * 100.0));
+  return g_strdup_printf ("%d%%", (int) (val * 100.0 + 0.5));
 }
 
 static void



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