MathFu
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Typedefs Friends Groups Pages
mathfu::Vector< T, 2 > Class Template Reference

Public Types

typedef T Scalar
 

Public Member Functions

 Vector (const Vector< T, 2 > &v)
 
template<typename U >
 Vector (const Vector< U, 2 > &v)
 
 Vector (const T &s)
 
 Vector (const T *a)
 
 Vector (const T &s1, const T &s2)
 
 Vector (const VectorPacked< T, 2 > &vector)
 
T & operator() (const int i)
 
const T & operator() (const int i) const
 
T & operator[] (const int i)
 
const T & operator[] (const int i) const
 
Vector< T, 2 > xy ()
 
const Vector< T, 2 > xy () const
 
void Pack (VectorPacked< T, 2 > *const vector) const
 
LengthSquared () const
 
Length () const
 
Normalize ()
 
Vector< T, 2 > Normalized () const
 

Static Public Member Functions

template<typename CompatibleT >
static Vector< T, 2 > FromType (const CompatibleT &compatible)
 
template<typename CompatibleT >
static CompatibleT ToType (const Vector< T, 2 > &v)
 
static T DotProduct (const Vector< T, 2 > &v1, const Vector< T, 2 > &v2)
 
static Vector< T, 2 > HadamardProduct (const Vector< T, 2 > &v1, const Vector< T, 2 > &v2)
 
static Vector< T, 2 > Lerp (const Vector< T, 2 > &v1, const Vector< T, 2 > &v2, const T percent)
 
static Vector< T, 2 > RandomInRange (const Vector< T, 2 > &min, const Vector< T, 2 > &max)
 
static Vector< T, 2 > Max (const Vector< T, 2 > &v1, const Vector< T, 2 > &v2)
 
static Vector< T, 2 > Min (const Vector< T, 2 > &v1, const Vector< T, 2 > &v2)
 

Public Attributes

MATHFU_DEFINE_CLASS_SIMD_AWARE_NEW_DELETE
union mathfu::Vector< T, 2 >:: { ... }  
 
data_ [2]
 
x
 
y
 

Static Public Attributes

static const int d = 2
 

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