[recipes/wip/yield: 6/7] Fix a mismerge
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes/wip/yield: 6/7] Fix a mismerge
- Date: Sun, 25 Jun 2017 03:46:52 +0000 (UTC)
commit 41c46cb21ef6aa5f327a79e7cc738349d6b0b8fc
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jun 24 23:44:10 2017 -0400
Fix a mismerge
src/gr-number.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/gr-number.c b/src/gr-number.c
index 096ecba..3ccac82 100644
--- a/src/gr-number.c
+++ b/src/gr-number.c
@@ -325,14 +325,12 @@ out:
char *
gr_number_format (double number)
{
- double integral, rem;
+ double integral;
int num, denom;
integral = floor (number);
- rem = number - integral;
+ number -= integral;
- if (rational_approximation (rem, 20, &num, &denom))
- return format_fraction ((int)integral, num, denom);
- else
- return g_strdup_printf ("%g", number);
+ rational_approximation (number, 20, &num, &denom);
+ return format_fraction ((int)integral, num, denom);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]