| 1146 | // Get intersection points where point intersects with point |
| 1147 | template<typename T1, typename T2> |
| 1148 | inline std::vector<olc::v_2d<T2>> intersects(const olc::v_2d<T1>& p1, const olc::v_2d<T2>& p2) |
| 1149 | { |
| 1150 | if (contains(p1, p2)) |
| 1151 | return { p1 }; |
| 1152 | |
| 1153 | return {}; |
| 1154 | } |
| 1155 | |
| 1156 | // intersects(l,p) |
| 1157 | // Get intersection points where line segment intersects with point |