olcPixelGameEngine v2.28
The official distribution of olcPixelGameEngine, a tool used in javidx9's YouTube videos and projects
Loading...
Searching...
No Matches
olc::v_2d< T > Struct Template Reference

#include <olcPixelGameEngine.h>

Public Member Functions

constexpr v_2d ()=default
 
constexpr v_2d (T _x, T _y)
 
constexpr v_2d (const v_2d &v)=default
 
constexpr v_2doperator= (const v_2d &v)=default
 
constexpr auto area () const
 
auto mag () const
 
constexpr T mag2 () const
 
v_2d norm () const
 
constexpr v_2d perp () const
 
constexpr v_2d floor () const
 
constexpr v_2d ceil () const
 
constexpr v_2d max (const v_2d &v) const
 
constexpr v_2d min (const v_2d &v) const
 
constexpr auto dot (const v_2d &rhs) const
 
constexpr auto cross (const v_2d &rhs) const
 
constexpr v_2d cart () const
 
constexpr v_2d polar () const
 
constexpr v_2d clamp (const v_2d &v1, const v_2d &v2) const
 
constexpr v_2d lerp (const v_2d &v1, const double t) const
 
constexpr bool operator== (const v_2d &rhs) const
 
constexpr bool operator!= (const v_2d &rhs) const
 
std::string str () const
 
constexpr v_2d reflect (const v_2d &n) const
 
template<class F >
constexpr operator v_2d< F > () const
 

Public Attributes

T x = 0
 
T y = 0
 

Constructor & Destructor Documentation

◆ v_2d() [1/3]

template<class T >
olc::v_2d< T >::v_2d ( )
inlineconstexprdefault

◆ v_2d() [2/3]

template<class T >
olc::v_2d< T >::v_2d ( T _x,
T _y )
inlineconstexpr

◆ v_2d() [3/3]

template<class T >
olc::v_2d< T >::v_2d ( const v_2d< T > & v)
inlineconstexprdefault

Member Function Documentation

◆ area()

template<class T >
auto olc::v_2d< T >::area ( ) const
inlineconstexpr

◆ cart()

template<class T >
v_2d olc::v_2d< T >::cart ( ) const
inlineconstexpr

◆ ceil()

template<class T >
v_2d olc::v_2d< T >::ceil ( ) const
inlineconstexpr

◆ clamp()

template<class T >
v_2d olc::v_2d< T >::clamp ( const v_2d< T > & v1,
const v_2d< T > & v2 ) const
inlineconstexpr

◆ cross()

template<class T >
auto olc::v_2d< T >::cross ( const v_2d< T > & rhs) const
inlineconstexpr

◆ dot()

template<class T >
auto olc::v_2d< T >::dot ( const v_2d< T > & rhs) const
inlineconstexpr

◆ floor()

template<class T >
v_2d olc::v_2d< T >::floor ( ) const
inlineconstexpr

◆ lerp()

template<class T >
v_2d olc::v_2d< T >::lerp ( const v_2d< T > & v1,
const double t ) const
inlineconstexpr

◆ mag()

template<class T >
auto olc::v_2d< T >::mag ( ) const
inline

◆ mag2()

template<class T >
T olc::v_2d< T >::mag2 ( ) const
inlineconstexpr

◆ max()

template<class T >
v_2d olc::v_2d< T >::max ( const v_2d< T > & v) const
inlineconstexpr

◆ min()

template<class T >
v_2d olc::v_2d< T >::min ( const v_2d< T > & v) const
inlineconstexpr

◆ norm()

template<class T >
v_2d olc::v_2d< T >::norm ( ) const
inline

◆ operator v_2d< F >()

template<class T >
template<class F >
olc::v_2d< T >::operator v_2d< F > ( ) const
inlineconstexpr

◆ operator!=()

template<class T >
bool olc::v_2d< T >::operator!= ( const v_2d< T > & rhs) const
inlineconstexpr

◆ operator=()

template<class T >
v_2d & olc::v_2d< T >::operator= ( const v_2d< T > & v)
inlineconstexprdefault

◆ operator==()

template<class T >
bool olc::v_2d< T >::operator== ( const v_2d< T > & rhs) const
inlineconstexpr

◆ perp()

template<class T >
v_2d olc::v_2d< T >::perp ( ) const
inlineconstexpr

◆ polar()

template<class T >
v_2d olc::v_2d< T >::polar ( ) const
inlineconstexpr

◆ reflect()

template<class T >
v_2d olc::v_2d< T >::reflect ( const v_2d< T > & n) const
inlineconstexpr

◆ str()

template<class T >
std::string olc::v_2d< T >::str ( ) const
inline

Member Data Documentation

◆ x

template<class T >
T olc::v_2d< T >::x = 0

◆ y

template<class T >
T olc::v_2d< T >::y = 0

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