LinearAlgebra
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Static Public Member Functions | List of all members
a3d::Math< T > Struct Template Reference

Template-based math functions providing the essential operators for a specific type. More...

Public Member Functions

template<>
float sqrt (const float &v)
 
template<>
float sin (const float &v)
 
template<>
float cos (const float &v)
 
template<>
float acos (const float &v)
 
template<>
float epsilon ()
 
template<>
double sqrt (const double &v)
 
template<>
double sin (const double &v)
 
template<>
double cos (const double &v)
 
template<>
double acos (const double &v)
 
template<>
double epsilon ()
 

Static Public Member Functions

static T sqrt (const T &v)
 Calculate square root. More...
 
static T sin (const T &v)
 Calculate sinus. More...
 
static T cos (const T &v)
 Calculate cosinus. More...
 
static T acos (const T &v)
 Calculate arcus cosinus. More...
 
static T epsilon ()
 Return the smalles significant value of the type. More...
 

Detailed Description

template<class T>
struct a3d::Math< T >

Template-based math functions providing the essential operators for a specific type.

Implemented for float and double. Create your own set for your own type, for example fixed point type or complex type.

Member Function Documentation

template<class T >
static T a3d::Math< T >::acos ( const T &  v)
inlinestatic

Calculate arcus cosinus.

template<>
float a3d::Math< float >::acos ( const float &  v)
inline
template<>
double a3d::Math< double >::acos ( const double &  v)
inline
template<class T >
static T a3d::Math< T >::cos ( const T &  v)
inlinestatic

Calculate cosinus.

template<>
float a3d::Math< float >::cos ( const float &  v)
inline
template<>
double a3d::Math< double >::cos ( const double &  v)
inline
template<class T >
static T a3d::Math< T >::epsilon ( )
inlinestatic

Return the smalles significant value of the type.

template<>
float a3d::Math< float >::epsilon ( )
inline
template<>
double a3d::Math< double >::epsilon ( )
inline
template<class T >
static T a3d::Math< T >::sin ( const T &  v)
inlinestatic

Calculate sinus.

template<>
float a3d::Math< float >::sin ( const float &  v)
inline
template<>
double a3d::Math< double >::sin ( const double &  v)
inline
template<class T >
static T a3d::Math< T >::sqrt ( const T &  v)
inlinestatic

Calculate square root.

template<>
float a3d::Math< float >::sqrt ( const float &  v)
inline
template<>
double a3d::Math< double >::sqrt ( const double &  v)
inline