ScummVM API documentation
hpl::cVector2< T > Class Template Reference

Public Member Functions

constexpr cVector2 (T aVal)
 
constexpr cVector2 (T aX, T aY)
 
constexpr cVector2 (cVector2< T > const &aVec)
 
cVector2< T > & operator= (const cVector2< T > &aVec)
 
cVector2< T > & operator= (const T aVal)
 
bool operator== (const cVector2< T > &aVec) const
 
bool operator!= (const cVector2< T > &aVec) const
 
cVector2< T > operator+ (const cVector2< T > &aVec) const
 
cVector2< T > operator- (const cVector2< T > &aVec) const
 
cVector2< T > operator* (const cVector2< T > &aVec) const
 
cVector2< T > operator/ (const cVector2< T > &aVec) const
 
cVector2< T > & operator-= (const cVector2< T > &aVec)
 
cVector2< T > & operator+= (const cVector2< T > &aVec)
 
cVector2< T > & operator*= (const cVector2< T > &aVec)
 
cVector2< T > & operator/= (const cVector2< T > &aVec)
 
cVector2< T > operator/ (const T &aVal) const
 
cVector2< T > operator* (const T &aVal) const
 
cVector2< T > operator+ (const T &aVal) const
 
cVector2< T > operator- (const T &aVal) const
 
void FromVec (const T *apVec)
 
Normalise ()
 
tString ToString () const
 
tString ToFileString () const
 

Public Attributes

x
 
y
 

Member Function Documentation

◆ Normalise()

template<class T>
T hpl::cVector2< T >::Normalise ( )
inline

Only use this on double or float vectors

Returns
Length of Vector

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