[sysprof/wip/visualizers] window: use floor() instead of ceil()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/visualizers] window: use floor() instead of ceil()
- Date: Thu, 29 Sep 2016 01:08:58 +0000 (UTC)
commit 9bd3891d4325f4441da5eb1063991d1ba78325d8
Author: Christian Hergert <chergert redhat com>
Date: Wed Sep 28 18:08:34 2016 -0700
window: use floor() instead of ceil()
Otherwise we get 111% instead of 110%.
src/sp-window.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/sp-window.c b/src/sp-window.c
index 93e011c..4a3f357 100644
--- a/src/sp-window.c
+++ b/src/sp-window.c
@@ -724,7 +724,7 @@ zoom_level_to_string (GBinding *binding,
gpointer user_data)
{
gdouble percent = 100.0 * g_value_get_double (from_value);
- g_value_take_string (to_value, g_strdup_printf ("%u%%", (guint)ceil (percent)));
+ g_value_take_string (to_value, g_strdup_printf ("%u%%", (guint)floor (percent)));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]