add ft_abs

This commit is contained in:
Tanguy MAZE
2018-05-05 16:52:49 +02:00
parent 0b57c88beb
commit 0ea4e74d77
6 changed files with 27 additions and 20 deletions

View File

@@ -6,19 +6,12 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/08 11:20:12 by tmaze #+# #+# */
/* Updated: 2018/04/08 16:57:47 by tmaze ### ########.fr */
/* Updated: 2018/05/05 16:48:49 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
static unsigned long ft_abs(int n)
{
if (n < 0)
return ((unsigned long)n * -1);
return ((unsigned long)n);
}
char *ft_itoa(int n)
{
unsigned long mult;