15 lines
180 B
C
15 lines
180 B
C
#include "libft.h"
|
|
|
|
/**
|
|
* returns the absolute value of a double number
|
|
*/
|
|
|
|
double ft_fabs(double n)
|
|
{
|
|
if (n < 0)
|
|
n *= -1;
|
|
else if (n == 0)
|
|
n = 0; // for -0
|
|
return (n);
|
|
}
|