flipperzero-firmware/lib/toolbox/float_tools.c
Georgii Surkov 8582670a34
[FL-2811] Fix PVS-Studio warnings (#2142)
Co-authored-by: あく <alleteam@gmail.com>
Co-authored-by: gornekich <n.gorbadey@gmail.com>
2022-12-26 21:13:30 +09:00

9 lines
174 B
C

#include "float_tools.h"
#include <math.h>
#include <float.h>
bool float_is_equal(float a, float b) {
return fabsf(a - b) <= FLT_EPSILON * fmaxf(fabsf(a), fabsf(b));
}