diff options
Diffstat (limited to '')
-rw-r--r-- | libft/src/ft_labs.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libft/src/ft_labs.c b/libft/src/ft_labs.c new file mode 100644 index 0000000..980c005 --- /dev/null +++ b/libft/src/ft_labs.c @@ -0,0 +1,16 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_labs.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:19:27 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:19:29 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +long ft_labs(long j) +{ + return ((j < 0) ? (-j) : (j)); +} |