Unsigned integer 2 component vector structure. More...
#include <uint.hpp>
Public Member Functions | |
constexpr | uint2 (uint32 xy=0u) noexcept |
Creates a new unsigned integer 2 component vector structure. | |
constexpr | uint2 (uint32 x, uint32 y) noexcept |
Creates a new unsigned integer 2 component vector structure. | |
uint32 & | operator[] (psize i) noexcept |
Returns vector component by index. | |
uint32 | operator[] (psize i) const noexcept |
Returns vector component by index. | |
constexpr | operator uint32 () noexcept |
Returns first vector component value. (x) | |
constexpr uint2 | operator+ (uint2 v) const noexcept |
constexpr uint2 | operator- (uint2 v) const noexcept |
constexpr uint2 | operator* (uint2 v) const noexcept |
constexpr uint2 | operator/ (uint2 v) const noexcept |
constexpr uint2 | operator% (uint2 v) const noexcept |
constexpr uint2 | operator& (uint2 v) const noexcept |
constexpr uint2 | operator| (uint2 v) const noexcept |
constexpr uint2 | operator^ (uint2 v) const noexcept |
constexpr uint2 | operator>> (uint2 v) const noexcept |
constexpr uint2 | operator<< (uint2 v) const noexcept |
constexpr uint2 | operator+ (uint32 n) const noexcept |
constexpr uint2 | operator- (uint32 n) const noexcept |
constexpr uint2 | operator* (uint32 n) const noexcept |
constexpr uint2 | operator/ (uint32 n) const noexcept |
constexpr uint2 | operator% (uint32 n) const noexcept |
constexpr uint2 | operator& (uint32 n) const noexcept |
constexpr uint2 | operator| (uint32 n) const noexcept |
constexpr uint2 | operator^ (uint32 n) const noexcept |
constexpr uint2 | operator>> (uint32 n) const noexcept |
constexpr uint2 | operator<< (uint32 n) const noexcept |
constexpr uint2 | operator- () const noexcept |
constexpr uint2 | operator! () const noexcept |
constexpr uint2 | operator~ () const noexcept |
uint2 & | operator+= (uint2 v) noexcept |
uint2 & | operator-= (uint2 v) noexcept |
uint2 & | operator*= (uint2 v) noexcept |
uint2 & | operator/= (uint2 v) noexcept |
uint2 & | operator%= (uint2 v) noexcept |
uint2 & | operator&= (uint2 v) noexcept |
uint2 & | operator|= (uint2 v) noexcept |
uint2 & | operator^= (uint2 v) noexcept |
uint2 & | operator>>= (uint2 v) noexcept |
uint2 & | operator<<= (uint2 v) noexcept |
uint2 & | operator+= (uint32 n) noexcept |
uint2 & | operator-= (uint32 n) noexcept |
uint2 & | operator*= (uint32 n) noexcept |
uint2 & | operator/= (uint32 n) noexcept |
uint2 & | operator%= (uint32 n) noexcept |
uint2 & | operator&= (uint32 n) noexcept |
uint2 & | operator|= (uint32 n) noexcept |
uint2 & | operator^= (uint32 n) noexcept |
uint2 & | operator>>= (uint32 n) noexcept |
uint2 & | operator<<= (uint32 n) noexcept |
uint2 & | operator= (uint32 n) noexcept |
constexpr bool | operator== (uint2 v) const noexcept |
constexpr bool | operator!= (uint2 v) const noexcept |
constexpr uint2 | operator< (uint2 v) const noexcept |
constexpr uint2 | operator> (uint2 v) const noexcept |
constexpr uint2 | operator<= (uint2 v) const noexcept |
constexpr uint2 | operator>= (uint2 v) const noexcept |
constexpr bool | operator== (uint32 n) const noexcept |
constexpr bool | operator!= (uint32 n) const noexcept |
constexpr uint2 | operator< (uint32 n) const noexcept |
constexpr uint2 | operator> (uint32 n) const noexcept |
constexpr uint2 | operator<= (uint32 n) const noexcept |
constexpr uint2 | operator>= (uint32 n) const noexcept |
Public Attributes | |
uint32 | x |
uint32 | y |
Static Public Attributes | |
static const uint2 | zero = uint2(0u) |
static const uint2 | one = uint2(1u) |
Unsigned integer 2 component vector structure.
Commonly used to represent: points, positions, etc.
Creates a new unsigned integer 2 component vector structure.
xy | target value for all vector components |
Creates a new unsigned integer 2 component vector structure.
x | first vector component value |
y | second vector component value |
Returns vector component by index.
i | target component index |
Returns vector component by index.
i | target component index |
uint32 x |
First vector component.
uint32 y |
Second vector component.