libplist  2.7.0
API Documentation - Return to Homepage

◆ plist_real_val_compare()

PLIST_API int plist_real_val_compare ( plist_t  realnode,
double  cmpval 
)

Helper function to compare the value of a PLIST_REAL node against a given value.

Note
WARNING: Comparing floating point values can give inaccurate results because of the nature of floating point values on computer systems. While this function is designed to be as accurate as possible, please don't rely on it too much.
Parameters
realnodenode of type PLIST_REAL
cmpvalvalue to compare against
Returns
0 if the node's value and cmpval are (almost) equal, 1 if the node's value is greater than cmpval, or -1 if the node's value is less than cmpval.