cub3d/src/math/dist.c

21 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* dist.c :+: :+: */
/* +:+ */
/* By: qmennen <qmennen@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2025/04/25 10:07:59 by whaffman #+# #+# */
/* Updated: 2025/05/07 11:50:10 by whaffman ######## odam.nl */
/* */
/* ************************************************************************** */
#include "cub3d.h"
#include "math.h"
#include "vec_math.h"
double dist(t_vec2 a, t_vec2 b)
{
return (sqrtf((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)));
}