1. 직선의 교점
#include<wykobi/wykobi.hpp>
#include<wykobi/wykobi_algorithm.hpp>
std::vector<wykobi::line<float, 2>> lines(2);
lines[0][0].x = 300;
lines[0][0].y = 300;
lines[0][1].x = 300;
lines[0][1].y = 400;
lines[1][0].x = 200;
lines[1][0].y = 440;
lines[1][1].x = 250;
lines[1][1].y = 500;
std::vector<wykobi::point2d<float>> intersection_list;
wykobi::algorithm::naive_group_intersections<wykobi::segment<wykobi::point2d<float>, 2>>(lines.begin(),lines.end(),std::back_inserter(intersection_list));
2. 점과 선분의 거리
wykobi::segment<float, 2> segments;
segments[0][0].x = 300;
segments[0][0].y = 300;
segments[0][1].x = 300;
segments[0][1].y = 400;
float dist = wykobi::minimum_distance_from_point_to_segment<float>(wpoint, segments);