Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
fixedf< FRAC_BITS > Class Template Reference

#include <fixed.h>

Public Member Functions

 fixedf ()
 
constexpr fixedf (Sint64 raw)
 
constexpr fixedf (Sint64 num, Sint64 denom)
 
fixedf Abs () const
 
fixedfoperator*= (const fixedf &a)
 
fixedfoperator*= (const Sint64 a)
 
fixedfoperator/= (const fixedf &a)
 
fixedfoperator/= (const Sint64 a)
 
fixedfoperator+= (const fixedf &a)
 
fixedfoperator+= (const Sint64 a)
 
fixedfoperator-= (const fixedf &a)
 
fixedfoperator-= (const Sint64 a)
 
fixedfoperator>>= (const int a)
 
fixedfoperator<<= (const int a)
 
int ToInt32 () const
 
Sint64 ToInt64 () const
 
float ToFloat () const
 
double ToDouble () const
 
template<int NEW_FRAC_BITS>
 operator fixedf () const
 

Static Public Member Functions

static fixedf FromDouble (const double val)
 
static fixedf SqrtOf (const fixedf &a)
 
static fixedf CubeRootOf (const fixedf &a)
 

Public Attributes

Sint64 v
 

Static Public Attributes

static const int FRAC = FRAC_BITS
 
static const Uint64 MASK = (Uint64(1UL) << FRAC_BITS) - 1
 

Friends

fixedf operator+ (const fixedf &a, const Sint64 b)
 
fixedf operator- (const fixedf &a, const Sint64 b)
 
fixedf operator* (const fixedf &a, const Sint64 b)
 
fixedf operator/ (const fixedf &a, const Sint64 b)
 
fixedf operator+ (const Sint64 a, const fixedf &b)
 
fixedf operator- (const Sint64 a, const fixedf &b)
 
fixedf operator* (const Sint64 a, const fixedf &b)
 
fixedf operator/ (const Sint64 a, const fixedf &b)
 
bool operator== (const fixedf &a, const Sint64 b)
 
bool operator== (const Sint64 a, const fixedf &b)
 
bool operator!= (const fixedf &a, const Sint64 b)
 
bool operator!= (const Sint64 a, const fixedf &b)
 
bool operator>= (const fixedf &a, const Sint64 b)
 
bool operator>= (const Sint64 a, const fixedf &b)
 
bool operator<= (const fixedf &a, const Sint64 b)
 
bool operator<= (const Sint64 a, const fixedf &b)
 
bool operator> (const fixedf &a, const Sint64 b)
 
bool operator> (const Sint64 a, const fixedf &b)
 
bool operator< (const fixedf &a, const Sint64 b)
 
bool operator< (const Sint64 a, const fixedf &b)
 
fixedf operator>> (const fixedf &a, const int b)
 
fixedf operator<< (const fixedf &a, const int b)
 
fixedf operator- (const fixedf &a)
 
fixedf operator+ (const fixedf &a, const fixedf &b)
 
fixedf operator- (const fixedf &a, const fixedf &b)
 
fixedf operator* (const fixedf &a, const fixedf &b)
 
fixedf operator/ (const fixedf &a, const fixedf &b)
 
bool operator== (const fixedf &a, const fixedf &b)
 
bool operator!= (const fixedf &a, const fixedf &b)
 
bool operator> (const fixedf &a, const fixedf &b)
 
bool operator< (const fixedf &a, const fixedf &b)
 
bool operator>= (const fixedf &a, const fixedf &b)
 
bool operator<= (const fixedf &a, const fixedf &b)
 

Constructor & Destructor Documentation

◆ fixedf() [1/3]

template<int FRAC_BITS>
fixedf< FRAC_BITS >::fixedf ( )
inline

◆ fixedf() [2/3]

template<int FRAC_BITS>
constexpr fixedf< FRAC_BITS >::fixedf ( Sint64  raw)
inlineconstexpr

◆ fixedf() [3/3]

template<int FRAC_BITS>
constexpr fixedf< FRAC_BITS >::fixedf ( Sint64  num,
Sint64  denom 
)
inlineconstexpr

Member Function Documentation

◆ Abs()

template<int FRAC_BITS>
fixedf fixedf< FRAC_BITS >::Abs ( ) const
inline
Here is the call graph for this function:

◆ CubeRootOf()

template<int FRAC_BITS>
static fixedf fixedf< FRAC_BITS >::CubeRootOf ( const fixedf< FRAC_BITS > &  a)
inlinestatic
Here is the call graph for this function:

◆ FromDouble()

template<int FRAC_BITS>
static fixedf fixedf< FRAC_BITS >::FromDouble ( const double  val)
inlinestatic
Here is the call graph for this function:

◆ operator fixedf()

template<int FRAC_BITS>
template<int NEW_FRAC_BITS>
fixedf< FRAC_BITS >::operator fixedf ( ) const
inline

◆ operator*=() [1/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator*= ( const fixedf< FRAC_BITS > &  a)
inline

◆ operator*=() [2/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator*= ( const Sint64  a)
inline

◆ operator+=() [1/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator+= ( const fixedf< FRAC_BITS > &  a)
inline

◆ operator+=() [2/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator+= ( const Sint64  a)
inline

◆ operator-=() [1/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator-= ( const fixedf< FRAC_BITS > &  a)
inline

◆ operator-=() [2/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator-= ( const Sint64  a)
inline

◆ operator/=() [1/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator/= ( const fixedf< FRAC_BITS > &  a)
inline

◆ operator/=() [2/2]

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator/= ( const Sint64  a)
inline

◆ operator<<=()

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator<<= ( const int  a)
inline

◆ operator>>=()

template<int FRAC_BITS>
fixedf & fixedf< FRAC_BITS >::operator>>= ( const int  a)
inline

◆ SqrtOf()

template<int FRAC_BITS>
static fixedf fixedf< FRAC_BITS >::SqrtOf ( const fixedf< FRAC_BITS > &  a)
inlinestatic
Here is the call graph for this function:

◆ ToDouble()

template<int FRAC_BITS>
double fixedf< FRAC_BITS >::ToDouble ( ) const
inline

◆ ToFloat()

template<int FRAC_BITS>
float fixedf< FRAC_BITS >::ToFloat ( ) const
inline

◆ ToInt32()

template<int FRAC_BITS>
int fixedf< FRAC_BITS >::ToInt32 ( ) const
inline

◆ ToInt64()

template<int FRAC_BITS>
Sint64 fixedf< FRAC_BITS >::ToInt64 ( ) const
inline

Friends And Related Symbol Documentation

◆ operator!= [1/3]

template<int FRAC_BITS>
bool operator!= ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator!= [2/3]

template<int FRAC_BITS>
bool operator!= ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator!= [3/3]

template<int FRAC_BITS>
bool operator!= ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator* [1/3]

template<int FRAC_BITS>
fixedf operator* ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator* [2/3]

template<int FRAC_BITS>
fixedf operator* ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator* [3/3]

template<int FRAC_BITS>
fixedf operator* ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator+ [1/3]

template<int FRAC_BITS>
fixedf operator+ ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator+ [2/3]

template<int FRAC_BITS>
fixedf operator+ ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator+ [3/3]

template<int FRAC_BITS>
fixedf operator+ ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator- [1/4]

template<int FRAC_BITS>
fixedf operator- ( const fixedf< FRAC_BITS > &  a)
friend

◆ operator- [2/4]

template<int FRAC_BITS>
fixedf operator- ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator- [3/4]

template<int FRAC_BITS>
fixedf operator- ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator- [4/4]

template<int FRAC_BITS>
fixedf operator- ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator/ [1/3]

template<int FRAC_BITS>
fixedf operator/ ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator/ [2/3]

template<int FRAC_BITS>
fixedf operator/ ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator/ [3/3]

template<int FRAC_BITS>
fixedf operator/ ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator< [1/3]

template<int FRAC_BITS>
bool operator< ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator< [2/3]

template<int FRAC_BITS>
bool operator< ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator< [3/3]

template<int FRAC_BITS>
bool operator< ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator<<

template<int FRAC_BITS>
fixedf operator<< ( const fixedf< FRAC_BITS > &  a,
const int  b 
)
friend

◆ operator<= [1/3]

template<int FRAC_BITS>
bool operator<= ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator<= [2/3]

template<int FRAC_BITS>
bool operator<= ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator<= [3/3]

template<int FRAC_BITS>
bool operator<= ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator== [1/3]

template<int FRAC_BITS>
bool operator== ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator== [2/3]

template<int FRAC_BITS>
bool operator== ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator== [3/3]

template<int FRAC_BITS>
bool operator== ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator> [1/3]

template<int FRAC_BITS>
bool operator> ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator> [2/3]

template<int FRAC_BITS>
bool operator> ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator> [3/3]

template<int FRAC_BITS>
bool operator> ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator>= [1/3]

template<int FRAC_BITS>
bool operator>= ( const fixedf< FRAC_BITS > &  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator>= [2/3]

template<int FRAC_BITS>
bool operator>= ( const fixedf< FRAC_BITS > &  a,
const Sint64  b 
)
friend

◆ operator>= [3/3]

template<int FRAC_BITS>
bool operator>= ( const Sint64  a,
const fixedf< FRAC_BITS > &  b 
)
friend

◆ operator>>

template<int FRAC_BITS>
fixedf operator>> ( const fixedf< FRAC_BITS > &  a,
const int  b 
)
friend

Member Data Documentation

◆ FRAC

template<int FRAC_BITS>
const int fixedf< FRAC_BITS >::FRAC = FRAC_BITS
static

◆ MASK

template<int FRAC_BITS>
const Uint64 fixedf< FRAC_BITS >::MASK = (Uint64(1UL) << FRAC_BITS) - 1
static

◆ v

template<int FRAC_BITS>
Sint64 fixedf< FRAC_BITS >::v

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