TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::int2 Struct Reference

Integer 2D vector. More...

#include <gui_core/gui_base_types.h>

Public Member Functions

int32_t & operator[] (int index)
const int32_t & operator[] (int index) const
bool operator== (const int2 &other) const
bool operator!= (const int2 &other) const
int2 operator- () const
int2 operator+ () const
int2 operator- (const int2 &other) const
int2 operator+ (const int2 &other) const
int2 & operator-= (const int2 &other)
int2 & operator+= (const int2 &other)

Public Attributes

int32_t x
int32_t y

Detailed Description

Integer 2D vector.

Trivial (no member initializers) so IntRect can overlay it in a union; initialize with {} to start at 0.

Member Function Documentation

◆ operator[]() [1/2]

int32_t & tachyon::int2::operator[] ( int index)
inline

◆ operator[]() [2/2]

const int32_t & tachyon::int2::operator[] ( int index) const
inline

◆ operator==()

bool tachyon::int2::operator== ( const int2 & other) const
inline

◆ operator!=()

bool tachyon::int2::operator!= ( const int2 & other) const
inline

◆ operator-() [1/2]

int2 tachyon::int2::operator- ( ) const
inline

◆ operator+() [1/2]

int2 tachyon::int2::operator+ ( ) const
inline

◆ operator-() [2/2]

int2 tachyon::int2::operator- ( const int2 & other) const
inline

◆ operator+() [2/2]

int2 tachyon::int2::operator+ ( const int2 & other) const
inline

◆ operator-=()

int2 & tachyon::int2::operator-= ( const int2 & other)
inline

◆ operator+=()

int2 & tachyon::int2::operator+= ( const int2 & other)
inline

Member Data Documentation

◆ x

int32_t tachyon::int2::x

◆ y

int32_t tachyon::int2::y

The documentation for this struct was generated from the following file: