[glib/g-property: 19/22] gproperty: Fix minimum floating point values
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/g-property: 19/22] gproperty: Fix minimum floating point values
- Date: Fri, 8 Jul 2011 14:44:15 +0000 (UTC)
commit 19ed3eef7980dec03eb1bb23b0ffe95e06e87fd2
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Jul 7 12:51:27 2011 +0100
gproperty: Fix minimum floating point values
The G_MINFLOAT and G_MINDOUBLE macros are not what their name implies.
gobject/gproperty.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gobject/gproperty.c b/gobject/gproperty.c
index c93604a..671a370 100644
--- a/gobject/gproperty.c
+++ b/gobject/gproperty.c
@@ -1762,7 +1762,7 @@ property_float_init (GParamSpec *pspec)
{
GFloatProperty *property = (GFloatProperty *) pspec;
- property->min_value = G_MINFLOAT;
+ property->min_value = -G_MAXFLOAT;
property->max_value = G_MAXFLOAT;
property->epsilon = G_FLOAT_EPSILON;
}
@@ -2040,7 +2040,7 @@ property_double_init (GParamSpec *pspec)
{
GDoubleProperty *property = (GDoubleProperty *) pspec;
- property->min_value = G_MINDOUBLE;
+ property->min_value = -G_MAXDOUBLE;
property->max_value = G_MAXDOUBLE;
property->epsilon = G_DOUBLE_EPSILON;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]