-
Notifications
You must be signed in to change notification settings - Fork 1
/
cylinder_intersection_norm.c
43 lines (37 loc) · 1.26 KB
/
cylinder_intersection_norm.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cylinder_intersection_norm.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mghalmi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/27 15:15:52 by mghalmi #+# #+# */
/* Updated: 2024/01/27 15:36:00 by mghalmi ### ########.fr */
/* */
/* ************************************************************************** */
#include "main.h"
double check_dist(double x2[2], t_obj *lst)
{
double dist;
if (x2[0] < x2[1])
dist = lst->fig.cy.dist1;
else
dist = lst->fig.cy.dist2;
return (dist);
}
double check_x(double x2[2])
{
double x;
if (x2[0] < x2[1])
x = x2[0];
else
x = x2[1];
return (x);
}
double select_closest(double id1, double id2)
{
if (id1 < id2)
return (id1);
else
return (id2);
}