verif norm ok
This commit is contained in:
@@ -43,14 +43,15 @@ void init_offset(t_fdf *fdf)
|
||||
{
|
||||
int diagonal;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
x = (fdf->map_width) * (fdf->map_width);
|
||||
x += (fdf->map_height) * (fdf->map_height);
|
||||
y = (fdf->map_height) * (fdf->map_height);
|
||||
fdf->offset = 1;
|
||||
diagonal = 1;
|
||||
while (diagonal < fdf->win_size_x)
|
||||
{
|
||||
diagonal = x * (fdf->offset * fdf->offset);
|
||||
diagonal = (x + y) * (fdf->offset * fdf->offset);
|
||||
diagonal = ft_sqrt(diagonal);
|
||||
fdf->offset++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user