securely comparison of floating-point variables */
| 110 | |
| 111 | /* securely comparison of floating-point variables */ |
| 112 | static cJSON_bool compare_double(double a, double b) |
| 113 | { |
| 114 | double maxVal = fabs(a) > fabs(b) ? fabs(a) : fabs(b); |
| 115 | return (fabs(a - b) <= maxVal * DBL_EPSILON); |
| 116 | } |
| 117 | |
| 118 | |
| 119 | /* Compare the next path element of two JSON pointers, two NULL pointers are considered unequal: */ |
no outgoing calls
no test coverage detected
searching dependent graphs…