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

Method intersection

qcustomplot/qcustomplot.cpp:2287–2294  ·  view source on GitHub ↗

! Returns the data range which is contained in both this data range and \a other. This method is very similar to \ref bounded, with one distinction: If this range and the \a other range share no intersection, the returned data range will be empty with begin and end set to 0. (\ref bounded would return a range with begin and end set to one of the boundaries of \a other, depending on wh

Source from the content-addressed store, hash-verified

2285 \see QCPDataSelection::intersection
2286*/
2287QCPDataRange QCPDataRange::intersection(const QCPDataRange &other) const
2288{
2289 QCPDataRange result(qMax(mBegin, other.mBegin), qMin(mEnd, other.mEnd));
2290 if (result.isValid())
2291 return result;
2292 else
2293 return QCPDataRange();
2294}
2295
2296/*!
2297 Returns whether this data range and \a other share common data points.

Callers

nothing calls this directly

Calls 5

addDataRangeMethod · 0.80
atMethod · 0.80
simplifyMethod · 0.80
sizeMethod · 0.45
dataRangeMethod · 0.45

Tested by

no test coverage detected