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

Function contains

utilities/olcUTIL_Geometry2D.h:1024–1027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022 // Checks if point contains point
1023 template<typename T1, typename T2>
1024 inline constexpr bool contains(const olc::v_2d<T1>& p1, const olc::v_2d<T2>& p2)
1025 {
1026 return (p1 - p2).mag2() < epsilon;
1027 }
1028
1029 // contains(l,p)
1030 // Checks if line contains point

Callers 4

insertMethod · 0.85
searchMethod · 0.85
overlapsFunction · 0.85
intersectsFunction · 0.85

Calls 6

overlapsFunction · 0.85
closestFunction · 0.85
vectorMethod · 0.80
mag2Method · 0.45
dotMethod · 0.45
sideMethod · 0.45

Tested by

no test coverage detected