ciabatta/code/math/abs.c

17 lines
184 B
C
Raw Normal View History

2022-06-08 04:34:37 +00:00
#include <math.h>
double fabs(double x) {
if(x >= 0) {
return x;
}
return -x;
}
float fabsf(float x) {
if(x >= 0) {
return x;
}
return -x;
}