|
constexpr | Size2 () |
| Constructs default size (0, 0). More...
|
|
constexpr | Size2 (size_t x_, size_t y_) |
| Constructs size with given parameters x_ and y_ . More...
|
|
template<typename U > |
| Size2 (const std::initializer_list< U > &lst) |
| Constructs size with initializer list. More...
|
|
constexpr | Size2 (const Size2 &v) |
| Copy constructor. More...
|
|
void | set (size_t s) |
| Set both x and y components to s . More...
|
|
void | set (size_t x, size_t y) |
| Set x and y components with given parameters. More...
|
|
template<typename U > |
void | set (const std::initializer_list< U > &lst) |
| Set x and y components with given initializer list. More...
|
|
void | set (const Size2 &pt) |
| Set x and y with other size pt . More...
|
|
void | setZero () |
| Set both x and y to zero. More...
|
|
Size2 | add (size_t v) const |
| Computes this + (v, v). More...
|
|
Size2 | add (const Size2 &v) const |
| Computes this + (v.x, v.y). More...
|
|
Size2 | sub (size_t v) const |
| Computes this - (v, v). More...
|
|
Size2 | sub (const Size2 &v) const |
| Computes this - (v.x, v.y). More...
|
|
Size2 | mul (size_t v) const |
| Computes this * (v, v). More...
|
|
Size2 | mul (const Size2 &v) const |
| Computes this * (v.x, v.y). More...
|
|
Size2 | div (size_t v) const |
| Computes this / (v, v). More...
|
|
Size2 | div (const Size2 &v) const |
| Computes this / (v.x, v.y). More...
|
|
Size2 | rsub (size_t v) const |
| Computes (v, v) - this. More...
|
|
Size2 | rsub (const Size2 &v) const |
| Computes (v.x, v.y) - this. More...
|
|
Size2 | rdiv (size_t v) const |
| Computes (v, v) / this. More...
|
|
Size2 | rdiv (const Size2 &v) const |
| Computes (v.x, v.y) / this. More...
|
|
void | iadd (size_t v) |
| Computes this += (v, v). More...
|
|
void | iadd (const Size2 &v) |
| Computes this += (v.x, v.y). More...
|
|
void | isub (size_t v) |
| Computes this -= (v, v). More...
|
|
void | isub (const Size2 &v) |
| Computes this -= (v.x, v.y). More...
|
|
void | imul (size_t v) |
| Computes this *= (v, v). More...
|
|
void | imul (const Size2 &v) |
| Computes this *= (v.x, v.y). More...
|
|
void | idiv (size_t v) |
| Computes this /= (v, v). More...
|
|
void | idiv (const Size2 &v) |
| Computes this /= (v.x, v.y). More...
|
|
const size_t & | at (size_t i) const |
| Returns const reference to the i -th element of the size. More...
|
|
size_t & | at (size_t i) |
| Returns reference to the i -th element of the size. More...
|
|
size_t | sum () const |
| Returns the sum of all the components (i.e. x + y). More...
|
|
size_t | min () const |
| Returns the minimum value among x and y. More...
|
|
size_t | max () const |
| Returns the maximum value among x and y. More...
|
|
size_t | absmin () const |
| Returns the absolute minimum value among x and y. More...
|
|
size_t | absmax () const |
| Returns the absolute maximum value among x and y. More...
|
|
size_t | dominantAxis () const |
| Returns the index of the dominant axis. More...
|
|
size_t | subminantAxis () const |
| Returns the index of the subminant axis. More...
|
|
bool | isEqual (const Size2 &other) const |
| Returns true if other is the same as this size. More...
|
|
size_t & | operator[] (size_t i) |
| Returns reference to the i -th element of the size. More...
|
|
const size_t & | operator[] (size_t i) const |
| Returns const reference to the i -th element of the size. More...
|
|
template<typename U > |
Size2 & | operator= (const std::initializer_list< U > &lst) |
| Set x and y components with given initializer list. More...
|
|
Size2 & | operator= (const Size2 &v) |
| Set x and y with other size pt . More...
|
|
Size2 & | operator+= (size_t v) |
| Computes this += (v, v) More...
|
|
Size2 & | operator+= (const Size2 &v) |
| Computes this += (v.x, v.y) More...
|
|
Size2 & | operator-= (size_t v) |
| Computes this -= (v, v) More...
|
|
Size2 & | operator-= (const Size2 &v) |
| Computes this -= (v.x, v.y) More...
|
|
Size2 & | operator*= (size_t v) |
| Computes this *= (v, v) More...
|
|
Size2 & | operator*= (const Size2 &v) |
| Computes this *= (v.x, v.y) More...
|
|
Size2 & | operator/= (size_t v) |
| Computes this /= (v, v) More...
|
|
Size2 & | operator/= (const Size2 &v) |
| Computes this /= (v.x, v.y) More...
|
|
bool | operator== (const Size2 &v) const |
| Returns true if other is the same as this size. More...
|
|
bool | operator!= (const Size2 &v) const |
| Returns true if other is the not same as this size. More...
|
|
2-D size class.
This class defines simple 2-D size data.