add ft_abs
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user