|  | 
| 6 | 6 | /* By: TheTerror <jfaye@student.42lyon.fr> +#+ +:+ +#+ */ | 
| 7 | 7 | /* +#+#+#+#+#+ +#+ */ | 
| 8 | 8 | /* Created: 2024年02月07日 15:06:58 by lmohin #+# #+# */ | 
| 9 |  | -/* Updated: 2024/02/11 16:16:59 by TheTerror ### ########lyon.fr */ | 
|  | 9 | +/* Updated: 2024/02/13 17:57:49 by lmohin ### ########.fr */ | 
| 10 | 10 | /* */ | 
| 11 | 11 | /* ************************************************************************** */ | 
| 12 | 12 | 
 | 
| @@ -69,13 +69,13 @@ t_vec	get_normal_cylinder(t_cy cylinder, t_ray main_ray) | 
| 69 | 69 | 		return (normal_cy); | 
| 70 | 70 | 	normal_cy.x = main_ray.o.x + main_ray.len * main_ray.dir.x; | 
| 71 | 71 | 	normal_cy.x -= (cylinder.o.x + cylinder.h / 2 * (-1) * cylinder.axis.x \ | 
| 72 |  | -		+ sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.x); | 
|  | 72 | +		+ __sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.x); | 
| 73 | 73 | 	normal_cy.y = main_ray.o.y + main_ray.len * main_ray.dir.y; | 
| 74 | 74 | 	normal_cy.y -= (cylinder.o.y + cylinder.h / 2 * (-1) * cylinder.axis.y \ | 
| 75 |  | -		+ sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.y); | 
|  | 75 | +		+ __sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.y); | 
| 76 | 76 | 	normal_cy.z = main_ray.o.z + main_ray.len * main_ray.dir.z; | 
| 77 | 77 | 	normal_cy.z -= (cylinder.o.z + cylinder.h / 2 * (-1) * cylinder.axis.z \ | 
| 78 |  | -		+ sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.z); | 
|  | 78 | +		+ __sqrt(dist_center - __sq(cylinder.r)) * cylinder.axis.z); | 
| 79 | 79 | 	vectornormalize(&normal_cy, &normal_cy); | 
| 80 | 80 | 	return (normal_cy); | 
| 81 | 81 | } | 
|  | 
0 commit comments