P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
Vector2< T > Struct Template Reference

#include <Vector2.hpp>

Public Member Functions

template<typename = typename std::enable_if<std::is_convertible<decltype(std::declval<T>() == std::declval<T>()), bool>::value, ::type>
bool operator== (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_convertible<decltype(std::declval<T>() == std::declval<T>()), bool>::value, ::type>
bool operator!= (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 operator+ (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 operator- (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 operator* (T scalar) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 operator/ (T scalar) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & operator+= (const Vector2 &other)
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & operator-= (const Vector2 &other)
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & operator*= (T scalar)
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & operator/= (T scalar)
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 operator- () const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T dot (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T cross (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T square_magnitude () const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::conditional< std::is_floating_point< T >::value, T, double >::type magnitude () const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::conditional< std::is_floating_point< T >::value, T, double >::type distance (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
double angle (const Vector2 &other) const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 normalized () const
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
void normalize ()
template<typename U = T, typename = typename std::enable_if<std::is_floating_point<U>::value>::type>
bool same (const Vector2 &other, T epsilon=epsilon_v< T >) const

Public Attributes

T x {}
T y {}

Member Function Documentation

◆ angle()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
double Vector2< T >::angle ( const Vector2< T > & other) const
inline

◆ cross()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T Vector2< T >::cross ( const Vector2< T > & other) const
inline

◆ distance()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::conditional< std::is_floating_point< T >::value, T, double >::type Vector2< T >::distance ( const Vector2< T > & other) const
inline

◆ dot()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T Vector2< T >::dot ( const Vector2< T > & other) const
inline

◆ magnitude()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
std::conditional< std::is_floating_point< T >::value, T, double >::type Vector2< T >::magnitude ( ) const
inline

◆ normalize()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
void Vector2< T >::normalize ( )
inline

◆ normalized()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::normalized ( ) const
inline

◆ operator!=()

template<typename T>
template<typename = typename std::enable_if<std::is_convertible<decltype(std::declval<T>() == std::declval<T>()), bool>::value, ::type>
bool Vector2< T >::operator!= ( const Vector2< T > & other) const
inline

◆ operator*()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::operator* ( T scalar) const
inline

◆ operator*=()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & Vector2< T >::operator*= ( T scalar)
inline

◆ operator+()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::operator+ ( const Vector2< T > & other) const
inline

◆ operator+=()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & Vector2< T >::operator+= ( const Vector2< T > & other)
inline

◆ operator-() [1/2]

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::operator- ( ) const
inline

◆ operator-() [2/2]

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::operator- ( const Vector2< T > & other) const
inline

◆ operator-=()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & Vector2< T >::operator-= ( const Vector2< T > & other)
inline

◆ operator/()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 Vector2< T >::operator/ ( T scalar) const
inline

◆ operator/=()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
Vector2 & Vector2< T >::operator/= ( T scalar)
inline

◆ operator==()

template<typename T>
template<typename = typename std::enable_if<std::is_convertible<decltype(std::declval<T>() == std::declval<T>()), bool>::value, ::type>
bool Vector2< T >::operator== ( const Vector2< T > & other) const
inline

◆ same()

template<typename T>
template<typename U = T, typename = typename std::enable_if<std::is_floating_point<U>::value>::type>
bool Vector2< T >::same ( const Vector2< T > & other,
T epsilon = epsilon_v<T> ) const
inline

◆ square_magnitude()

template<typename T>
template<typename = typename std::enable_if<std::is_arithmetic<T>::value>::type>
T Vector2< T >::square_magnitude ( ) const
inline

Member Data Documentation

◆ x

template<typename T>
T Vector2< T >::x {}

◆ y

template<typename T>
T Vector2< T >::y {}

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