struct TVector4

template<class T>

A four dimensional vector.

Public

Constructors

TVector4<T>

TVector4<T>() = default

TVector4<T>

constexpr TVector4<T>(ZeroTag)

TVector4<T>

constexpr TVector4<T>(T x, T y, T z, T w)

TVector4<T>

constexpr explicit TVector4<T>(const TVector3<T> &other, T w = (T)0.)

TVector4

TVector4() noexcept = default

TVector4

constexpr TVector4(ZeroTag)

TVector4

constexpr TVector4(float x, float y, float z, float w)

TVector4

constexpr explicit TVector4(const TVector3<float> &other, float w = (float)0.)

TVector4

TVector4() = default

TVector4

constexpr TVector4(ZeroTag)

TVector4

constexpr TVector4(double x, double y, double z, double w)

TVector4

constexpr explicit TVector4(const TVector3<double> &other, double w)

Methods

Swap

void Swap(TVector4<T> &other)

Exchange the contents of this vector with another.

Dot

T Dot(const TVector4<T> &rhs) const

Calculates the dot (scalar) product of this vector with another.

IsNaN

inline bool IsNaN() const

Checks are any of the vector components NaN.

Swap

void Swap(TVector4<float> &other)

Exchange the contents of this vector with another.

Dot

float Dot(const TVector4<float> &rhs) const

Calculates the dot (scalar) product of this vector with another.

IsNaN

inline bool IsNaN() const

Checks are any of the vector components NaN.

Swap

void Swap(TVector4<double> &other)

Exchange the contents of this vector with another.

Dot

double Dot(const TVector4<double> &rhs) const

Calculates the dot (scalar) product of this vector with another.

IsNaN

inline bool IsNaN() const

Checks are any of the vector components NaN.

Fields

X

T X

Y

T Y

Z

T Z

W

T W

X

float X

Y

float Y

Z

float Z

W

float W

X

double X

Y

double Y

Z

double Z

W

double W

Operators

operator[]

T operator[](u32 i) const

operator[]

T &operator[](u32 i)

operator=

TVector4<T> &operator=(T rhs)

operator==

bool operator==(const TVector4<T> &rhs) const

operator!=

bool operator!=(const TVector4<T> &rhs) const

operator=

TVector4<T> &operator=(const TVector3<T> &rhs)

operator+

TVector4<T> operator+(const TVector4<T> &rhs) const

operator-

TVector4<T> operator-(const TVector4<T> &rhs) const

operator*

TVector4<T> operator*(T rhs) const

operator*

TVector4<T> operator*(const TVector4<T> &rhs) const

operator/

TVector4<T> operator/(T rhs) const

operator/

TVector4<T> operator/(const TVector4<T> &rhs) const

operator+

const TVector4<T> &operator+() const

operator-

TVector4<T> operator-() const

operator+=

TVector4<T> &operator+=(const TVector4<T> &rhs)

operator-=

TVector4<T> &operator-=(const TVector4<T> &rhs)

operator*=

TVector4<T> &operator*=(T rhs)

operator+=

TVector4<T> &operator+=(T rhs)

operator-=

TVector4<T> &operator-=(T rhs)

operator*=

TVector4<T> &operator*=(TVector4<T> &rhs)

operator/=

TVector4<T> &operator/=(T rhs)

operator/=

TVector4<T> &operator/=(const TVector4<T> &rhs)

operator[]

float operator[](u32 i) const

operator[]

float &operator[](u32 i)

operator=

TVector4<float> &operator=(float rhs)

operator==

bool operator==(const TVector4<float> &rhs) const

operator!=

bool operator!=(const TVector4<float> &rhs) const

operator=

TVector4<float> &operator=(const TVector3<float> &rhs)

operator+

TVector4<float> operator+(const TVector4<float> &rhs) const

operator-

TVector4<float> operator-(const TVector4<float> &rhs) const

operator*

TVector4<float> operator*(float rhs) const

operator*

TVector4<float> operator*(const TVector4<float> &rhs) const

operator/

TVector4<float> operator/(float rhs) const

operator/

TVector4<float> operator/(const TVector4<float> &rhs) const

operator+

const TVector4<float> &operator+() const

operator-

TVector4<float> operator-() const

operator+=

TVector4<float> &operator+=(const TVector4<float> &rhs)

operator-=

TVector4<float> &operator-=(const TVector4<float> &rhs)

operator*=

TVector4<float> &operator*=(float rhs)

operator+=

TVector4<float> &operator+=(float rhs)

operator-=

TVector4<float> &operator-=(float rhs)

operator*=

TVector4<float> &operator*=(TVector4<float> &rhs)

operator/=

TVector4<float> &operator/=(float rhs)

operator/=

TVector4<float> &operator/=(const TVector4<float> &rhs)

operator[]

double operator[](u32 i) const

operator[]

double &operator[](u32 i)

operator=

TVector4<double> &operator=(double rhs)

operator==

bool operator==(const TVector4<double> &rhs) const

operator!=

bool operator!=(const TVector4<double> &rhs) const

operator=

TVector4<double> &operator=(const TVector3<double> &rhs)

operator+

TVector4<double> operator+(const TVector4<double> &rhs) const

operator-

TVector4<double> operator-(const TVector4<double> &rhs) const

operator*

TVector4<double> operator*(double rhs) const

operator*

TVector4<double> operator*(const TVector4<double> &rhs) const

operator/

TVector4<double> operator/(double rhs) const

operator/

TVector4<double> operator/(const TVector4<double> &rhs) const

operator+

const TVector4<double> &operator+() const

operator-

TVector4<double> operator-() const

operator+=

TVector4<double> &operator+=(const TVector4<double> &rhs)

operator-=

TVector4<double> &operator-=(const TVector4<double> &rhs)

operator*=

TVector4<double> &operator*=(double rhs)

operator+=

TVector4<double> &operator+=(double rhs)

operator-=

TVector4<double> &operator-=(double rhs)

operator*=

TVector4<double> &operator*=(TVector4<double> &rhs)

operator/=

TVector4<double> &operator/=(double rhs)

operator/=

TVector4<double> &operator/=(const TVector4<double> &rhs)