update norme et check max number et mmin number

This commit is contained in:
YANNIS
2025-02-22 18:33:11 +01:00
parent fe4bc4b980
commit 7867244f63
3 changed files with 22 additions and 8 deletions
+16 -1
View File
@@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* isdigit_token.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/22 18:27:48 by yantoine #+# #+# */
/* Updated: 2025/02/22 18:28:45 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
#include "miniRT.h"
int isdigit_token(char **tokens)
@@ -11,7 +23,10 @@ int isdigit_token(char **tokens)
j = -1;
while (tokens[i][++j])
{
if (!ft_isdigit(tokens[i][j]) && tokens[i][j] != '\n' && tokens[i][j] != '-' && tokens[i][j] != ',')
if (!ft_isdigit(tokens[i][j]) \
&& tokens[i][j] != '\n' \
&& tokens[i][j] != '-' \
&& tokens[i][j] != ',')
{
printf("%c\n", tokens[i][j]);
printf("%p\n", tokens[i]);
+2 -2
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 20:02:36 by yantoine #+# #+# */
/* Updated: 2025/02/19 16:57:35 by yantoine ### ########.fr */
/* Updated: 2025/02/22 18:29:15 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -236,8 +236,8 @@ char **get_tokens_secure(t_scene scene, const int numObject,
// Check
int check_tokens(char **tokens, int expected);
int isdigit_token(char **tokens);
void check_if_max(t_scene scene, const int to_test, const int max);
int isdigit_token(char **tokens);
// Intersection
float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal);
+4 -5
View File
@@ -6,7 +6,7 @@
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/17 19:24:30 by yantoine #+# #+# */
/* Updated: 2025/02/19 16:59:45 by yantoine ### ########.fr */
/* Updated: 2025/02/22 18:32:17 by yantoine ### ########.fr */
/* */
/* ************************************************************************** */
@@ -43,10 +43,9 @@ void render_scene(t_app *app)
{
const int total_pixels = app->win_height * app->win_width;
static int done;
static int progress;
int y;
int x;
static int progress;
int y;
int x;
y = 0;
while (y < app->win_height)