1.3.49
 
Loading...
Searching...
No Matches
helios::int4 Struct Reference

Vector of four elements of type 'int'. More...

#include <helios_vector_types.h>

Public Member Functions

constexpr int4 ()
 Default constructor.
 
 int4 (const std::vector< int > &v)
 Construct int3 from a vector of ints.
 
constexpr int4 (const int v[4])
 Construct int4 from an array of ints.
 
constexpr int4 (int v0, int v1, int v2, int v3)
 Construct int4 from four ints.
 
constexpr int4 operator+ (const int4 &a) const noexcept
 Add two int4 vectors.
 
int4operator+= (const int4 &a) noexcept
 Increment int4 vector.
 
int4operator-= (const int4 &a) noexcept
 Decrement int4 vector.
 
constexpr int4 operator- (const int4 &a) const noexcept
 Subtract two int4 vectors.
 
constexpr bool operator== (const int4 &a) const noexcept
 Equality for all elements.
 
constexpr bool operator!= (const int4 &a) const noexcept
 Inequality for all elements.
 
constexpr int4 operator- () const noexcept
 Multiply each element by -1.
 

Data Fields

int x
 First element in vector.
 
int y
 Second element in vector.
 
int z
 Third element in vector.
 
int w
 Fourth element in vector.
 

Friends

std::ostream & operator<< (std::ostream &os, const helios::int4 &vec)
 Write int4 to output stream.
 

Detailed Description

Vector of four elements of type 'int'.

Definition at line 245 of file helios_vector_types.h.

Constructor & Destructor Documentation

◆ int4() [1/4]

constexpr helios::int4::int4 ( )
inlineconstexpr

Default constructor.

Definition at line 259 of file helios_vector_types.h.

◆ int4() [2/4]

helios::int4::int4 ( const std::vector< int > &  v)
inlineexplicit

Construct int3 from a vector of ints.

Definition at line 263 of file helios_vector_types.h.

◆ int4() [3/4]

constexpr helios::int4::int4 ( const int  v[4])
inlineexplicitconstexpr

Construct int4 from an array of ints.

Definition at line 274 of file helios_vector_types.h.

◆ int4() [4/4]

constexpr helios::int4::int4 ( int  v0,
int  v1,
int  v2,
int  v3 
)
inlineconstexpr

Construct int4 from four ints.

Definition at line 278 of file helios_vector_types.h.

Member Function Documentation

◆ operator!=()

constexpr bool helios::int4::operator!= ( const int4 a) const
constexprnoexcept

Inequality for all elements.

Definition at line 340 of file helios_vector_types.h.

◆ operator+()

constexpr int4 helios::int4::operator+ ( const int4 a) const
constexprnoexcept

Add two int4 vectors.

Definition at line 312 of file helios_vector_types.h.

◆ operator+=()

int4 & helios::int4::operator+= ( const int4 a)
inlinenoexcept

Increment int4 vector.

Definition at line 316 of file helios_vector_types.h.

◆ operator-() [1/2]

constexpr int4 helios::int4::operator- ( ) const
constexprnoexcept

Multiply each element by -1.

Definition at line 344 of file helios_vector_types.h.

◆ operator-() [2/2]

constexpr int4 helios::int4::operator- ( const int4 a) const
constexprnoexcept

Subtract two int4 vectors.

Definition at line 332 of file helios_vector_types.h.

◆ operator-=()

int4 & helios::int4::operator-= ( const int4 a)
inlinenoexcept

Decrement int4 vector.

Definition at line 324 of file helios_vector_types.h.

◆ operator==()

constexpr bool helios::int4::operator== ( const int4 a) const
constexprnoexcept

Equality for all elements.

Definition at line 336 of file helios_vector_types.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const helios::int4 vec 
)
friend

Write int4 to output stream.

Definition at line 297 of file helios_vector_types.h.

Field Documentation

◆ w

int helios::int4::w

Fourth element in vector.

Definition at line 255 of file helios_vector_types.h.

◆ x

int helios::int4::x

First element in vector.

Definition at line 249 of file helios_vector_types.h.

◆ y

int helios::int4::y

Second element in vector.

Definition at line 251 of file helios_vector_types.h.

◆ z

int helios::int4::z

Third element in vector.

Definition at line 253 of file helios_vector_types.h.


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