static double my_forms(t_base *base, t_element *tmp) { if (tmp->type == 1) return (my_sphere(base, tmp)); else if (tmp->type == 2) return (my_plan(base, tmp)); else if (tmp->type == 3) return (my_cylindre(base, tmp)); else if (tmp->type == 4) return (my_cone(base, tmp)); return (-1); }
int my_intersection(int ac, char **av, t_ints *ints) { my_straightline(ac, av, ints); if (my_getnbr(av[1]) == 1) my_sphere(ac, av, ints); else if (my_getnbr(av[1]) == 2) my_cylinder(ac, av, ints); else if (my_getnbr(av[1]) == 3) my_cone(ac, av, ints); if (my_getnbr(av[1]) != 1 && my_getnbr(av[1]) != 2 && my_getnbr(av[1]) != 3) check_option(); return (0); }