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

Function closest

utilities/olcUTIL_Geometry2D.h:803–806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801 // Returns closest point on point to any shape (aka the original point) :P
802 template<typename T1, typename T2>
803 inline olc::v_2d<T1> closest(const olc::v_2d<T1>& p, [[maybe_unused]] const T2& anything_who_cares)
804 {
805 return p;
806 }
807
808 // closest(l,p)
809 // Returns closest point on line to point

Callers 3

overlapsFunction · 0.85
intersectsFunction · 0.85
containsFunction · 0.85

Calls 8

vectorMethod · 0.80
topMethod · 0.80
bottomMethod · 0.80
leftMethod · 0.80
rightMethod · 0.80
dotMethod · 0.45
mag2Method · 0.45
normMethod · 0.45

Tested by

no test coverage detected