Function Macro

GLibassert_cmpfloat_with_epsilon

Declaration [src]

#define g_assert_cmpfloat_with_epsilon (
  n1,
  n2,
  epsilon
)

Description [src]

Debugging macro to compare two floating point numbers within an epsilon.

The effect of g_assert_cmpfloat_with_epsilon (n1, n2, epsilon) is the same as g_assert_true (abs (n1 - n2) < epsilon). The advantage of this macro is that it can produce a message that includes the actual values of n1 and n2.

Available since:2.58

Parameters

n1 -
 

A floating point number.

n2 -
 

Another floating point number.

epsilon -
 

A numeric value that expresses the expected tolerance between n1 and n2