liballofw
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
allofw::Vector2_< T > Struct Template Reference

#include <vector.h>

Public Types

typedef T number_t
 

Public Member Functions

 Vector2_ ()=default
 
template<typename number_from_t >
 Vector2_ (const Vector2_< number_from_t > &v)
 
 Vector2_ (number_t v)
 
 Vector2_ (number_t x_, number_t y_)
 
template<typename OtherT >
 Vector2_ (const OtherT &other)
 
Vector2_operator+= (const Vector2_ &v)
 
Vector2_operator-= (const Vector2_ &v)
 
Vector2_operator*= (number_t s)
 
Vector2_operator/= (number_t s)
 
Vector2_ operator+ (const Vector2_ &v) const
 
Vector2_ operator- (const Vector2_ &v) const
 
Vector2_ operator- () const
 
Vector2_ operator* (number_t s) const
 
Vector2_ operator/ (number_t s) const
 
number_t dot (const Vector2_ &v) const
 
number_t len2 () const
 
number_t len () const
 
Vector2_ unit () const
 
number_t cross (const Vector2_ &v) const
 
number_t operator* (const Vector2_ &v) const
 
Vector2_ rotate90deg () const
 
double angle () const
 
number_tdata ()
 
const number_tdata () const
 
int shape () const
 

Static Public Member Functions

static Vector2_ NaN ()
 

Public Attributes

union {
   number_t   x
 
   number_t   w
 
}; 
 
union {
   number_t   y
 
   number_t   h
 
}; 
 

Static Public Attributes

static const size_t size = 2
 

Friends

Vector2_ operator* (number_t s, const Vector2_ &v)
 

Member Typedef Documentation

template<typename T>
typedef T allofw::Vector2_< T >::number_t

Constructor & Destructor Documentation

template<typename T>
allofw::Vector2_< T >::Vector2_ ( )
default
template<typename T>
template<typename number_from_t >
allofw::Vector2_< T >::Vector2_ ( const Vector2_< number_from_t > &  v)
inline
template<typename T>
allofw::Vector2_< T >::Vector2_ ( number_t  v)
inline
template<typename T>
allofw::Vector2_< T >::Vector2_ ( number_t  x_,
number_t  y_ 
)
inline
template<typename T>
template<typename OtherT >
allofw::Vector2_< T >::Vector2_ ( const OtherT &  other)
inline

Member Function Documentation

template<typename T>
double allofw::Vector2_< T >::angle ( ) const
inline
template<typename T>
number_t allofw::Vector2_< T >::cross ( const Vector2_< T > &  v) const
inline
template<typename T>
number_t* allofw::Vector2_< T >::data ( )
inline
template<typename T>
const number_t* allofw::Vector2_< T >::data ( ) const
inline
template<typename T>
number_t allofw::Vector2_< T >::dot ( const Vector2_< T > &  v) const
inline
template<typename T>
number_t allofw::Vector2_< T >::len ( ) const
inline
template<typename T>
number_t allofw::Vector2_< T >::len2 ( ) const
inline
template<typename T>
static Vector2_ allofw::Vector2_< T >::NaN ( )
inlinestatic
template<typename T>
Vector2_ allofw::Vector2_< T >::operator* ( number_t  s) const
inline
template<typename T>
number_t allofw::Vector2_< T >::operator* ( const Vector2_< T > &  v) const
inline
template<typename T>
Vector2_& allofw::Vector2_< T >::operator*= ( number_t  s)
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::operator+ ( const Vector2_< T > &  v) const
inline
template<typename T>
Vector2_& allofw::Vector2_< T >::operator+= ( const Vector2_< T > &  v)
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::operator- ( const Vector2_< T > &  v) const
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::operator- ( ) const
inline
template<typename T>
Vector2_& allofw::Vector2_< T >::operator-= ( const Vector2_< T > &  v)
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::operator/ ( number_t  s) const
inline
template<typename T>
Vector2_& allofw::Vector2_< T >::operator/= ( number_t  s)
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::rotate90deg ( ) const
inline
template<typename T>
int allofw::Vector2_< T >::shape ( ) const
inline
template<typename T>
Vector2_ allofw::Vector2_< T >::unit ( ) const
inline

Friends And Related Function Documentation

template<typename T>
Vector2_ operator* ( number_t  s,
const Vector2_< T > &  v 
)
friend

Member Data Documentation

union { ... }
union { ... }
template<typename T>
number_t allofw::Vector2_< T >::h
template<typename T>
const size_t allofw::Vector2_< T >::size = 2
static
template<typename T>
number_t allofw::Vector2_< T >::w
template<typename T>
number_t allofw::Vector2_< T >::x
template<typename T>
number_t allofw::Vector2_< T >::y

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