Math v0.0.1
uint3

Unsigned integer 3 component vector structure. More...

#include <uint.hpp>

Public Member Functions

constexpr uint3 (uint32 xyz=0u) noexcept
 Creates a new unsigned integer 3 component vector structure.
 
constexpr uint3 (uint32 x, uint32 y, uint32 z) noexcept
 Creates a new unsigned integer 3 component vector structure.
 
constexpr uint3 (uint2 xy, uint32 z) noexcept
 Creates a new unsigned integer 3 component vector structure.
 
constexpr uint3 (uint32 x, uint2 yz) noexcept
 Creates a new unsigned integer 3 component vector structure.
 
uint32operator[] (psize i) noexcept
 Returns vector component by index.
 
uint32 operator[] (psize i) const noexcept
 Returns vector component by index.
 
constexpr operator uint2 () const noexcept
 Returns as 2 component unsigned integer vector. (xy)
 
constexpr operator uint32 () const noexcept
 Returns first vector component value. (x)
 
constexpr uint3 operator+ (uint3 v) const noexcept
 
constexpr uint3 operator- (uint3 v) const noexcept
 
constexpr uint3 operator* (uint3 v) const noexcept
 
constexpr uint3 operator/ (uint3 v) const noexcept
 
constexpr uint3 operator% (uint3 v) const noexcept
 
constexpr uint3 operator& (uint3 v) const noexcept
 
constexpr uint3 operator| (uint3 v) const noexcept
 
constexpr uint3 operator^ (uint3 v) const noexcept
 
constexpr uint3 operator>> (uint3 v) const noexcept
 
constexpr uint3 operator<< (uint3 v) const noexcept
 
constexpr uint3 operator+ (uint32 n) const noexcept
 
constexpr uint3 operator- (uint32 n) const noexcept
 
constexpr uint3 operator* (uint32 n) const noexcept
 
constexpr uint3 operator/ (uint32 n) const noexcept
 
constexpr uint3 operator% (uint32 n) const noexcept
 
constexpr uint3 operator& (uint32 n) const noexcept
 
constexpr uint3 operator| (uint32 n) const noexcept
 
constexpr uint3 operator^ (uint32 n) const noexcept
 
constexpr uint3 operator>> (uint32 n) const noexcept
 
constexpr uint3 operator<< (uint32 n) const noexcept
 
constexpr uint3 operator- () const noexcept
 
constexpr uint3 operator! () const noexcept
 
uint3 operator~ () const noexcept
 
uint3operator+= (uint3 v) noexcept
 
uint3operator-= (uint3 v) noexcept
 
uint3operator*= (uint3 v) noexcept
 
uint3operator/= (uint3 v) noexcept
 
uint3operator%= (uint3 v) noexcept
 
uint3operator&= (uint3 v) noexcept
 
uint3operator|= (uint3 v) noexcept
 
uint3operator^= (uint3 v) noexcept
 
uint3operator>>= (uint3 v) noexcept
 
uint3operator<<= (uint3 v) noexcept
 
uint3operator+= (uint32 n) noexcept
 
uint3operator-= (uint32 n) noexcept
 
uint3operator*= (uint32 n) noexcept
 
uint3operator/= (uint32 n) noexcept
 
uint3operator%= (uint32 n) noexcept
 
uint3operator&= (uint32 n) noexcept
 
uint3operator|= (uint32 n) noexcept
 
uint3operator^= (uint32 n) noexcept
 
uint3operator>>= (uint32 n) noexcept
 
uint3operator<<= (uint32 n) noexcept
 
uint3operator= (uint32 n) noexcept
 
constexpr bool operator== (uint3 v) const noexcept
 
constexpr bool operator!= (uint3 v) const noexcept
 
constexpr uint3 operator< (uint3 v) const noexcept
 
constexpr uint3 operator> (uint3 v) const noexcept
 
constexpr uint3 operator<= (uint3 v) const noexcept
 
constexpr uint3 operator>= (uint3 v) const noexcept
 
constexpr bool operator== (uint32 n) const noexcept
 
constexpr bool operator!= (uint32 n) const noexcept
 
constexpr uint3 operator< (uint32 n) const noexcept
 
constexpr uint3 operator> (uint32 n) const noexcept
 
constexpr uint3 operator<= (uint32 n) const noexcept
 
constexpr uint3 operator>= (uint32 n) const noexcept
 

Public Attributes

uint32 x
 
uint32 y
 
uint32 z
 

Static Public Attributes

static const uint3 zero = uint3(0u)
 
static const uint3 one = uint3(1u)
 

Detailed Description

Unsigned integer 3 component vector structure.

Commonly used to represent: points, positions, etc.

Constructor & Destructor Documentation

◆ uint3() [1/4]

constexpr uint3 ( uint32 xyz = 0u)
inlineexplicitconstexprnoexcept

Creates a new unsigned integer 3 component vector structure.

Parameters
xyztarget value for all vector components

◆ uint3() [2/4]

constexpr uint3 ( uint32 x,
uint32 y,
uint32 z )
inlineconstexprnoexcept

Creates a new unsigned integer 3 component vector structure.

Parameters
xfirst vector component value
ysecond vector component value
zthird vector component value

◆ uint3() [3/4]

constexpr uint3 ( uint2 xy,
uint32 z )
inlineconstexprnoexcept

Creates a new unsigned integer 3 component vector structure.

Parameters
xyfirst and second vector components value
zthird vector component value

◆ uint3() [4/4]

constexpr uint3 ( uint32 x,
uint2 yz )
inlineconstexprnoexcept

Creates a new unsigned integer 3 component vector structure.

Parameters
xfirst vector component value
yzsecond and third vector components value

Member Function Documentation

◆ operator[]() [1/2]

uint32 & operator[] ( psize i)
inlinenoexcept

Returns vector component by index.

Parameters
itarget component index

◆ operator[]() [2/2]

uint32 operator[] ( psize i) const
inlinenoexcept

Returns vector component by index.

Parameters
itarget component index

Member Data Documentation

◆ x

uint32 x

First vector component.

◆ y

uint32 y

Second vector component.

◆ z

uint32 z

Third vector component.