Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::vec2 Struct Reference

#include <Ultralight/Geometry.h>

Details

2D Vector Helper

Public Member Functions

 vec2 ()
 
 vec2 (float x, float y)
 
 vec2 (float x)
 
vec2 yx () const
 
vec2 xx () const
 
vec2 yy () const
 
vec2operator+= (const vec2 &rhs)
 
vec2operator-= (const vec2 &rhs)
 
vec2operator*= (const vec2 &rhs)
 
vec2operator/= (const vec2 &rhs)
 
vec2operator+= (float rhs)
 
vec2operator-= (float rhs)
 
vec2operator*= (float rhs)
 
vec2operator/= (float rhs)
 

Public Attributes

float x
 
float y
 

Friends

vec2 operator+ (vec2 lhs, const vec2 &rhs)
 
vec2 operator- (vec2 lhs, const vec2 &rhs)
 
vec2 operator* (vec2 lhs, const vec2 &rhs)
 
vec2 operator/ (vec2 lhs, const vec2 &rhs)
 
vec2 operator+ (vec2 lhs, float rhs)
 
vec2 operator- (vec2 lhs, float rhs)
 
vec2 operator* (vec2 lhs, float rhs)
 
vec2 operator/ (vec2 lhs, float rhs)
 
bool operator== (const vec2 &a, const vec2 &b)
 
bool operator!= (const vec2 &a, const vec2 &b)
 
vec2 min_ (const vec2 &a, const vec2 &b)
 
vec2 max_ (const vec2 &a, const vec2 &b)
 
vec2 clamp (const vec2 &x, const vec2 &minVal, const vec2 &maxVal)
 
vec2 mix (const vec2 &a, const vec2 &b, float t)
 
float length (const vec2 &a)
 
float length2 (const vec2 &a)
 
float distance (const vec2 &a, const vec2 &b)
 
float distance2 (const vec2 &a, const vec2 &b)
 
vec2 normalize (const vec2 &a)
 
float dot (const vec2 &a, const vec2 &b)
 

Constructor & Destructor Documentation

◆ vec2() [1/3]

ultralight::vec2::vec2 ( )
inline

◆ vec2() [2/3]

ultralight::vec2::vec2 ( float  x,
float  y 
)
inline

◆ vec2() [3/3]

ultralight::vec2::vec2 ( float  x)
inline

Member Function Documentation

◆ operator*=() [1/2]

vec2 & ultralight::vec2::operator*= ( const vec2 rhs)
inline

◆ operator*=() [2/2]

vec2 & ultralight::vec2::operator*= ( float  rhs)
inline

◆ operator+=() [1/2]

vec2 & ultralight::vec2::operator+= ( const vec2 rhs)
inline

◆ operator+=() [2/2]

vec2 & ultralight::vec2::operator+= ( float  rhs)
inline

◆ operator-=() [1/2]

vec2 & ultralight::vec2::operator-= ( const vec2 rhs)
inline

◆ operator-=() [2/2]

vec2 & ultralight::vec2::operator-= ( float  rhs)
inline

◆ operator/=() [1/2]

vec2 & ultralight::vec2::operator/= ( const vec2 rhs)
inline

◆ operator/=() [2/2]

vec2 & ultralight::vec2::operator/= ( float  rhs)
inline

◆ xx()

vec2 ultralight::vec2::xx ( ) const
inline

◆ yx()

vec2 ultralight::vec2::yx ( ) const
inline

◆ yy()

vec2 ultralight::vec2::yy ( ) const
inline

Friends And Related Symbol Documentation

◆ clamp

vec2 clamp ( const vec2 x,
const vec2 minVal,
const vec2 maxVal 
)
friend

◆ distance

float distance ( const vec2 a,
const vec2 b 
)
friend

◆ distance2

float distance2 ( const vec2 a,
const vec2 b 
)
friend

◆ dot

float dot ( const vec2 a,
const vec2 b 
)
friend

◆ length

float length ( const vec2 a)
friend

◆ length2

float length2 ( const vec2 a)
friend

◆ max_

vec2 max_ ( const vec2 a,
const vec2 b 
)
friend

◆ min_

vec2 min_ ( const vec2 a,
const vec2 b 
)
friend

◆ mix

vec2 mix ( const vec2 a,
const vec2 b,
float  t 
)
friend

◆ normalize

vec2 normalize ( const vec2 a)
friend

◆ operator!=

bool operator!= ( const vec2 a,
const vec2 b 
)
friend

◆ operator* [1/2]

vec2 operator* ( vec2  lhs,
const vec2 rhs 
)
friend

◆ operator* [2/2]

vec2 operator* ( vec2  lhs,
float  rhs 
)
friend

◆ operator+ [1/2]

vec2 operator+ ( vec2  lhs,
const vec2 rhs 
)
friend

◆ operator+ [2/2]

vec2 operator+ ( vec2  lhs,
float  rhs 
)
friend

◆ operator- [1/2]

vec2 operator- ( vec2  lhs,
const vec2 rhs 
)
friend

◆ operator- [2/2]

vec2 operator- ( vec2  lhs,
float  rhs 
)
friend

◆ operator/ [1/2]

vec2 operator/ ( vec2  lhs,
const vec2 rhs 
)
friend

◆ operator/ [2/2]

vec2 operator/ ( vec2  lhs,
float  rhs 
)
friend

◆ operator==

bool operator== ( const vec2 a,
const vec2 b 
)
friend

Member Data Documentation

◆ x

float ultralight::vec2::x

◆ y

float ultralight::vec2::y

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