! 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
| 2285 | \see QCPDataSelection::intersection |
| 2286 | */ |
| 2287 | QCPDataRange 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. |
nothing calls this directly
no test coverage detected