Compare commits
1 Commits
3cf0b6ecb9
...
8edf428fed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8edf428fed |
2
Makefile
2
Makefile
@@ -127,7 +127,7 @@ SRCS = ft_memset.c \
|
||||
ft_greater.c \
|
||||
ft_smaller.c \
|
||||
ft_sign.c \
|
||||
ft_sign_f.c \
|
||||
ft_fsign.c \
|
||||
ft_modf.c \
|
||||
ft_pow.c \
|
||||
ft_sqrt.c \
|
||||
|
||||
@@ -129,7 +129,7 @@ double ft_fabs(double n);
|
||||
int ft_greater(int a, int b);
|
||||
int ft_smaller(int a, int b);
|
||||
int ft_sign(int i);
|
||||
int ft_sign_f(double i);
|
||||
int ft_fsign(double i);
|
||||
double ft_modf(double x, double *int_part);
|
||||
double ft_pow(double base, int exponent);
|
||||
double ft_round(double x);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#include "libft.h"
|
||||
|
||||
int ft_sign_f(double i)
|
||||
int ft_fsign(double i)
|
||||
{
|
||||
if (i < 0)
|
||||
return (-1);
|
||||
else if (i == 0)
|
||||
return (0);
|
||||
return (1);
|
||||
}
|
||||
Reference in New Issue
Block a user