[glib/g-property: 19/26] gproperty: Fix minimum floating point values



commit db8a2890ffb2f96db7c149220fd6aea554ce76b6
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]