cub3d/src/math/get_fraction.c
2025-05-12 12:56:12 +02:00

22 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* get_fraction.c :+: :+: */
/* +:+ */
/* By: whaffman <whaffman@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/05/12 12:09:27 by whaffman #+# #+# */
/* Updated: 2025/05/12 12:10:01 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#include "cub3d.h"
t_vec2 get_fraction(t_vec2 vec)
{
t_vec2 result;
result.x = vec.x - (int)vec.x;
result.y = vec.y - (int)vec.y;
return (result);
}