minishell/libft/srcs/ft_round.c
Tanguy MAZE cf62dae53b norm: splitted functions in main into appropriate file
Moved lstdelenvelem & env2lst to ms_env.c
Normed out files
2019-09-20 12:06:44 +02:00

21 lines
1015 B
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_round.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/10/24 13:37:41 by tmaze #+# #+# */
/* Updated: 2018/10/24 13:37:52 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_round(float x, float ind)
{
if ((x - (int)x) > ind)
return ((int)x + 1);
return ((int)x);
}