update norme et check max number et mmin number
This commit is contained in:
+16
-1
@@ -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]);
|
||||
|
||||
@@ -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);
|
||||
void check_if_max(t_scene scene, const int to_test, const int max);
|
||||
int isdigit_token(char **tokens);
|
||||
void check_if_max(t_scene scene, const int to_test, const int max);
|
||||
|
||||
// Intersection
|
||||
float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal);
|
||||
|
||||
@@ -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 */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -47,7 +47,6 @@ void render_scene(t_app *app)
|
||||
int y;
|
||||
int x;
|
||||
|
||||
|
||||
y = 0;
|
||||
while (y < app->win_height)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user