ScummVM API documentation
StarTrek::TFixedInt< T, totalBits, decimalBits > Class Template Reference

#include <fixedint.h>

Inheritance diagram for StarTrek::TFixedInt< T, totalBits, decimalBits >:
Common::Serializable

Public Member Functions

 TFixedInt (double d)
 
template<typename T2 , uint otherTB, uint otherDB>
 TFixedInt (const TFixedInt< T2, otherTB, otherDB > &fi)
 
raw () const
 
int16 toInt () const
 
double toDouble () const
 
TFixedInt operator- () const
 
int16 multToInt (int32 i)
 
TFixedInt operator* (int32 i) const
 
TFixedInt operator* (const TFixedInt &f) const
 
TFixedInt operator/ (int32 i) const
 
TFixedInt operator+ (const TFixedInt &f) const
 
TFixedInt operator- (const TFixedInt &f) const
 
void operator+= (const TFixedInt &f)
 
void operator-= (const TFixedInt &f)
 
bool operator== (double d) const
 
bool operator!= (double d) const
 
bool operator< (double d) const
 
bool operator<= (double d) const
 
bool operator> (double d) const
 
bool operator>= (double d) const
 
bool operator== (const TFixedInt &f) const
 
bool operator!= (const TFixedInt &f) const
 
bool operator< (const TFixedInt &f) const
 
bool operator<= (const TFixedInt &f) const
 
bool operator> (const TFixedInt &f) const
 
bool operator>= (const TFixedInt &f) const
 
void saveLoadWithSerializer (Common::Serializer &ser) override
 

Static Public Member Functions

static TFixedInt fromRaw (T raw)
 

Detailed Description

template<typename T, uint totalBits, uint decimalBits>
class StarTrek::TFixedInt< T, totalBits, decimalBits >

Signed fixed-point number.

Constructor & Destructor Documentation

◆ TFixedInt()

template<typename T, uint totalBits, uint decimalBits>
template<typename T2 , uint otherTB, uint otherDB>
StarTrek::TFixedInt< T, totalBits, decimalBits >::TFixedInt ( const TFixedInt< T2, otherTB, otherDB > &  fi)
inlineexplicit

Constructor from other fixed-point formats.

Member Function Documentation

◆ multToInt()

template<typename T, uint totalBits, uint decimalBits>
int16 StarTrek::TFixedInt< T, totalBits, decimalBits >::multToInt ( int32  i)
inline

Multiplication with an int, with the result being an int. Use this if the result might exceed the capacity of this type.

◆ operator*() [1/2]

template<typename T, uint totalBits, uint decimalBits>
TFixedInt StarTrek::TFixedInt< T, totalBits, decimalBits >::operator* ( int32  i) const
inline

Multiplication with an int, with the result being the same type.

◆ operator*() [2/2]

template<typename T, uint totalBits, uint decimalBits>
TFixedInt StarTrek::TFixedInt< T, totalBits, decimalBits >::operator* ( const TFixedInt< T, totalBits, decimalBits > &  f) const
inline

Multiplication with a FixedInt, with the result being the same type.

◆ operator/()

template<typename T, uint totalBits, uint decimalBits>
TFixedInt StarTrek::TFixedInt< T, totalBits, decimalBits >::operator/ ( int32  i) const
inline

Division with an int, with the result being the same type.


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