cosmopolitan/libc/math/fdimf.c

11 lines
144 B
C
Raw Normal View History

2020-06-15 14:18:57 +00:00
#include "libc/math/math.h"
float fdimf(float x, float y)
{
if (isnan(x))
return x;
if (isnan(y))
return y;
return x > y ? x - y : 0;
}