MCPcopy Create free account
hub / github.com/cutechess/cutechess / intersection

Method intersection

projects/gui/3rdparty/qcustomplot/qcustomplot.cpp:2314–2321  ·  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

2312 \see QCPDataSelection::intersection
2313*/
2314QCPDataRange QCPDataRange::intersection(const QCPDataRange &other) const
2315{
2316 QCPDataRange result(qMax(mBegin, other.mBegin), qMin(mEnd, other.mEnd));
2317 if (result.isValid())
2318 return result;
2319 else
2320 return {};
2321}
2322
2323/*!
2324 Returns whether this data range and \a other share common data points.

Callers

nothing calls this directly

Calls 4

addDataRangeMethod · 0.80
simplifyMethod · 0.80
isValidMethod · 0.45
dataRangeMethod · 0.45

Tested by

no test coverage detected