MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / intersects

Function intersects

utilities/olcUTIL_Geometry2D.h:1148–1154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

projectFunction · 0.85
collisionFunction · 0.85

Calls 15

containsFunction · 0.85
filter_duplicate_pointsFunction · 0.85
closestFunction · 0.85
overlapsFunction · 0.85
vectorMethod · 0.80
endMethod · 0.80
beginMethod · 0.80
push_backMethod · 0.80
side_countMethod · 0.45
sideMethod · 0.45
mag2Method · 0.45
crossMethod · 0.45

Tested by

no test coverage detected