MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / GetOverlap

Function GetOverlap

TheForceEngine/TFE_Polygon/clipper.cpp:3290–3304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3288//------------------------------------------------------------------------------
3289
3290bool GetOverlap(const cInt a1, const cInt a2, const cInt b1, const cInt b2,
3291 cInt& Left, cInt& Right)
3292{
3293 if (a1 < a2)
3294 {
3295 if (b1 < b2) {Left = std::max(a1,b1); Right = std::min(a2,b2);}
3296 else {Left = std::max(a1,b2); Right = std::min(a2,b1);}
3297 }
3298 else
3299 {
3300 if (b1 < b2) {Left = std::max(a2,b1); Right = std::min(a1,b2);}
3301 else {Left = std::max(a2,b2); Right = std::min(a1,b1);}
3302 }
3303 return Left < Right;
3304}
3305//------------------------------------------------------------------------------
3306
3307inline void UpdateOutPtIdxs(OutRec& outrec)

Callers 1

JoinPointsMethod · 0.85

Calls 2

maxFunction · 0.85
minFunction · 0.85

Tested by

no test coverage detected