adding sign and abs for doubles

This commit is contained in:
hugogogo
2026-05-06 22:54:20 +02:00
parent f93c635234
commit 78f6a2d9ba
6 changed files with 22 additions and 2 deletions

8
srcs/ft_abs_f.c Normal file
View File

@@ -0,0 +1,8 @@
#include "libft.h"
double ft_abs_f(double n)
{
if (n < 0)
n *= -1;
return (n);
}