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"
|
#include "miniRT.h"
|
||||||
|
|
||||||
int isdigit_token(char **tokens)
|
int isdigit_token(char **tokens)
|
||||||
@@ -11,7 +23,10 @@ int isdigit_token(char **tokens)
|
|||||||
j = -1;
|
j = -1;
|
||||||
while (tokens[i][++j])
|
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("%c\n", tokens[i][j]);
|
||||||
printf("%p\n", tokens[i]);
|
printf("%p\n", tokens[i]);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
|
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/02/13 20:02:36 by yantoine #+# #+# */
|
/* 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
|
// Check
|
||||||
int check_tokens(char **tokens, int expected);
|
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);
|
void check_if_max(t_scene scene, const int to_test, const int max);
|
||||||
int isdigit_token(char **tokens);
|
|
||||||
|
|
||||||
// Intersection
|
// Intersection
|
||||||
float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal);
|
float intersect_cylinder(t_ray ray, t_cylinder cy, t_vec3 *hitNormal);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
|
/* By: yantoine <yantoine@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/02/17 19:24:30 by yantoine #+# #+# */
|
/* 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;
|
const int total_pixels = app->win_height * app->win_width;
|
||||||
static int done;
|
static int done;
|
||||||
static int progress;
|
static int progress;
|
||||||
int y;
|
int y;
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
|
|
||||||
y = 0;
|
y = 0;
|
||||||
while (y < app->win_height)
|
while (y < app->win_height)
|
||||||
|
|||||||
Reference in New Issue
Block a user