summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_labs.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-28 18:57:09 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-28 18:57:09 +0200
commit2d75e800a1cd3dff630ec0080a864ef1779496c9 (patch)
treefa1ffe1d148a0cb731d8622c635963dd450fd084 /libft/src/ft_labs.c
parentTODO.org update (diff)
download42-minishell-2d75e800a1cd3dff630ec0080a864ef1779496c9.tar.gz
42-minishell-2d75e800a1cd3dff630ec0080a864ef1779496c9.tar.bz2
42-minishell-2d75e800a1cd3dff630ec0080a864ef1779496c9.tar.xz
42-minishell-2d75e800a1cd3dff630ec0080a864ef1779496c9.tar.zst
42-minishell-2d75e800a1cd3dff630ec0080a864ef1779496c9.zip
New libft funcs
Diffstat (limited to 'libft/src/ft_labs.c')
-rw-r--r--libft/src/ft_labs.c16
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));
+}