4 #include "VVGL_Defines.hpp" 24 Range(
const size_t & inLoc,
const size_t & inLen) : loc(inLoc), len(inLen) {}
27 inline size_t max()
const {
return loc+len; }
29 inline size_t min()
const {
return loc; }
32 size_t tmpLoc = this->
min();
33 size_t tmpMin = n.
min();
34 size_t tmpMax = n.
max();
35 if (tmpLoc>=tmpMin && tmpLoc<=tmpMax)
38 if (tmpLoc>=tmpMin && tmpLoc<=tmpMax)
42 Range & operator=(
const Range & n) { loc=n.loc; len=n.len;
return *
this; }
43 bool operator==(
const Range & n) {
return (loc==n.loc && len==n.len); }
Definition: GLBuffer.hpp:13
Describes an integer range using a value (loc) and size (len).
Definition: VVGL_Range.hpp:19
size_t min() const
Returns the min value of the range.
Definition: VVGL_Range.hpp:29
bool intersects(const Range &n) const
Returns a true if the receiver intersects the passed range.
Definition: VVGL_Range.hpp:31
size_t max() const
Returns the max value of the range.
Definition: VVGL_Range.hpp:27