![]() |
![]() |
![]() |
CTPL Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <ctpl/mathutils.h> #define CTPL_MATH_FLOAT_EQ (a, b) gboolean ctpl_math_string_to_float (const gchar *string
,gdouble *value
); gboolean ctpl_math_string_to_int (const gchar *string
,glong *value
); #define ctpl_math_float_to_string (f) #define ctpl_math_int_to_string (i)
# define CTPL_MATH_FLOAT_EQ(a, b) (fpclassify ((a) - (b)) == FP_ZERO)
Checks whether two floating-point values are equal.
gboolean ctpl_math_string_to_float (const gchar *string
,gdouble *value
);
Converts a whole string to a float.
gboolean ctpl_math_string_to_int (const gchar *string
,glong *value
);
Converts a whole string to an integer.
#define ctpl_math_float_to_string(f)
Converts a floating-point number to a string.
|
A floating-point number (C's double) |
Returns : |
A newly allocated string holding a representation of f in the C
locale. This string should be free with g_free() . |
#define ctpl_math_int_to_string(i)
Converts an integer number to a string.
|
An integer number (C's long int) |
Returns : |
A newly allocated string holding a representation of i in the C
locale. This string should be free with g_free() . |