21 lines
1015 B
C
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);
|
|
}
|