Function Macro
GLibAPPROX_VALUE
since: 2.58
Declaration [src]
#define G_APPROX_VALUE (
a,
b,
epsilon
)
Description [src]
Evaluates to a truth value if the absolute difference between a and b is
smaller than epsilon, and to a false value otherwise.
For example,
- G_APPROX_VALUE (5, 6, 2) evaluates to true
- G_APPROX_VALUE (3.14, 3.15, 0.001) evaluates to false
- G_APPROX_VALUE (n, 0.f, FLT_EPSILON) evaluates to true if n is within
the single precision floating point epsilon from zero.
Available since: 2.58
This function is not directly available to language bindings.