MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / segmentsIntersect

Method segmentsIntersect

qcustomplot/qcustomplot.cpp:21330–21350  ·  view source on GitHub ↗

! \internal Returns whether the segments defined by the coordinates (aLower, aUpper) and (bLower, bUpper) have overlap. The output parameter \a bPrecedence indicates whether the \a b segment reaches farther than the \a a segment or not. If \a bPrecedence returns 1, segment \a b reaches the farthest to higher coordinates (i.e. bUpper > aUpper). If it returns -1, segment \a a reache

Source from the content-addressed store, hash-verified

21328 \see getOverlappingSegments
21329*/
21330bool QCPGraph::segmentsIntersect(double aLower, double aUpper, double bLower, double bUpper, int &bPrecedence) const
21331{
21332 bPrecedence = 0;
21333 if (aLower > bUpper)
21334 {
21335 bPrecedence = -1;
21336 return false;
21337 } else if (bLower > aUpper)
21338 {
21339 bPrecedence = 1;
21340 return false;
21341 } else
21342 {
21343 if (aUpper > bUpper)
21344 bPrecedence = -1;
21345 else if (aUpper < bUpper)
21346 bPrecedence = 1;
21347
21348 return true;
21349 }
21350}
21351
21352/*! \internal
21353

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected