MCPcopy Create free account
hub / github.com/cinder/Cinder / Pt2IsBetweenPt1AndPt3

Function Pt2IsBetweenPt1AndPt3

blocks/Clipper/src/clipper.cpp:860–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

858//------------------------------------------------------------------------------
859
860bool Pt2IsBetweenPt1AndPt3(const IntPoint pt1,
861 const IntPoint pt2, const IntPoint pt3)
862{
863 if ((pt1 == pt3) || (pt1 == pt2) || (pt3 == pt2))
864 return false;
865 else if (pt1.X != pt3.X)
866 return (pt2.X > pt1.X) == (pt2.X < pt3.X);
867 else
868 return (pt2.Y > pt1.Y) == (pt2.Y < pt3.Y);
869}
870//------------------------------------------------------------------------------
871
872bool HorzSegmentsOverlap(cInt seg1a, cInt seg1b, cInt seg2a, cInt seg2b)

Callers 2

AddPathMethod · 0.85
FixupOutPolygonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected