Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
fixed Class Reference

#include <fixed.h>

Public Member Functions

 fixed (void)
 
 fixed (int numerator, int denominator)
 
 fixed (int value)
 
 fixed (char const *ascii)
 
 operator unsigned (void) const
 
fixedoperator*= (fixed const &rvalue)
 
fixedoperator*= (int rvalue)
 
fixedoperator/= (fixed const &rvalue)
 
fixedoperator/= (int rvalue)
 
fixedoperator+= (fixed const &rvalue)
 
fixedoperator-= (fixed const &rvalue)
 
const fixed operator* (fixed const &rvalue) const
 
const int operator* (int rvalue) const
 
const fixed operator/ (fixed const &rvalue) const
 
const int operator/ (int rvalue) const
 
const fixed operator+ (fixed const &rvalue) const
 
const int operator+ (int rvalue) const
 
const fixed operator- (fixed const &rvalue) const
 
const int operator- (int rvalue) const
 
fixedoperator>>= (unsigned rvalue)
 
fixedoperator<<= (unsigned rvalue)
 
const fixed operator>> (unsigned rvalue) const
 
const fixed operator<< (unsigned rvalue) const
 
bool operator== (fixed const &rvalue) const
 
bool operator!= (fixed const &rvalue) const
 
bool operator< (fixed const &rvalue) const
 
bool operator> (fixed const &rvalue) const
 
bool operator<= (fixed const &rvalue) const
 
bool operator>= (fixed const &rvalue) const
 
bool operator! (void) const
 
bool operator< (int rvalue) const
 
bool operator> (int rvalue) const
 
bool operator<= (int rvalue) const
 
bool operator>= (int rvalue) const
 
bool operator== (int rvalue) const
 
bool operator!= (int rvalue) const
 
void Round_Up (void)
 
void Round_Down (void)
 
void Round (void)
 
void Saturate (unsigned capvalue)
 
void Saturate (fixed const &capvalue)
 
void Sub_Saturate (unsigned capvalue)
 
void Sub_Saturate (fixed const &capvalue)
 
void Inverse (void)
 
int To_ASCII (char *buffer, int maxlen=-1) const
 
char const * As_ASCII (void) const
 

Static Public Attributes

static const fixed _1_2
 
static const fixed _1_3
 
static const fixed _1_4
 
static const fixed _3_4
 
static const fixed _2_3
 

Friends

const int operator* (int lvalue, fixed const &rvalue)
 
const int operator/ (int lvalue, fixed const &rvalue)
 
const int operator+ (int lvalue, fixed const &rvalue)
 
const int operator- (int lvalue, fixed const &rvalue)
 
bool operator< (unsigned lvalue, fixed const &rvalue)
 
bool operator> (unsigned lvalue, fixed const &rvalue)
 
bool operator<= (unsigned lvalue, fixed const &rvalue)
 
bool operator>= (unsigned lvalue, fixed const &rvalue)
 
bool operator== (unsigned lvalue, fixed const &rvalue)
 
bool operator!= (unsigned lvalue, fixed const &rvalue)
 
int operator*= (int &lvalue, fixed const &rvalue)
 
int operator/= (int &lvalue, fixed const &rvalue)
 
int operator+= (int &lvalue, fixed const &rvalue)
 
int operator-= (int &lvalue, fixed const &rvalue)
 
const fixed Round_Up (fixed const &value)
 
const fixed Round_Down (fixed const &value)
 
const fixed Round (fixed const &value)
 
const fixed Saturate (fixed const &value, unsigned capvalue)
 
const fixed Saturate (fixed const &value, fixed const &capvalue)
 
const fixed Sub_Saturate (fixed const &value, unsigned capvalue)
 
const fixed Sub_Saturate (fixed const &value, fixed const &capvalue)
 
const fixed Inverse (fixed const &value)
 

Detailed Description

Definition at line 72 of file fixed.h.

Constructor & Destructor Documentation

◆ fixed() [1/4]

fixed::fixed ( void )
inline

Definition at line 76 of file fixed.h.

◆ fixed() [2/4]

fixed::fixed ( int numerator,
int denominator )

Definition at line 59 of file fixed.cpp.

◆ fixed() [3/4]

fixed::fixed ( int value)
inline

Definition at line 82 of file fixed.h.

◆ fixed() [4/4]

fixed::fixed ( char const * ascii)

Definition at line 88 of file fixed.cpp.

Member Function Documentation

◆ As_ASCII()

char const * fixed::As_ASCII ( void ) const

Definition at line 242 of file fixed.cpp.

◆ Inverse()

void fixed::Inverse ( void )
inline

Definition at line 174 of file fixed.h.

◆ operator unsigned()

fixed::operator unsigned ( void ) const
inline

Definition at line 88 of file fixed.h.

◆ operator!()

bool fixed::operator! ( void ) const
inline

Definition at line 134 of file fixed.h.

◆ operator!=() [1/2]

bool fixed::operator!= ( fixed const & rvalue) const
inline

Definition at line 129 of file fixed.h.

◆ operator!=() [2/2]

bool fixed::operator!= ( int rvalue) const
inline

Definition at line 144 of file fixed.h.

◆ operator*() [1/2]

const fixed fixed::operator* ( fixed const & rvalue) const
inline

Definition at line 105 of file fixed.h.

◆ operator*() [2/2]

const int fixed::operator* ( int rvalue) const
inline

Definition at line 106 of file fixed.h.

◆ operator*=() [1/2]

fixed & fixed::operator*= ( fixed const & rvalue)
inline

Definition at line 93 of file fixed.h.

◆ operator*=() [2/2]

fixed & fixed::operator*= ( int rvalue)
inline

Definition at line 94 of file fixed.h.

◆ operator+() [1/2]

const fixed fixed::operator+ ( fixed const & rvalue) const
inline

Definition at line 111 of file fixed.h.

◆ operator+() [2/2]

const int fixed::operator+ ( int rvalue) const
inline

Definition at line 112 of file fixed.h.

◆ operator+=()

fixed & fixed::operator+= ( fixed const & rvalue)
inline

Definition at line 97 of file fixed.h.

◆ operator-() [1/2]

const fixed fixed::operator- ( fixed const & rvalue) const
inline

Definition at line 114 of file fixed.h.

◆ operator-() [2/2]

const int fixed::operator- ( int rvalue) const
inline

Definition at line 115 of file fixed.h.

◆ operator-=()

fixed & fixed::operator-= ( fixed const & rvalue)
inline

Definition at line 98 of file fixed.h.

◆ operator/() [1/2]

const fixed fixed::operator/ ( fixed const & rvalue) const
inline

Definition at line 108 of file fixed.h.

◆ operator/() [2/2]

const int fixed::operator/ ( int rvalue) const
inline

Definition at line 109 of file fixed.h.

◆ operator/=() [1/2]

fixed & fixed::operator/= ( fixed const & rvalue)
inline

Definition at line 95 of file fixed.h.

◆ operator/=() [2/2]

fixed & fixed::operator/= ( int rvalue)
inline

Definition at line 96 of file fixed.h.

◆ operator<() [1/2]

bool fixed::operator< ( fixed const & rvalue) const
inline

Definition at line 130 of file fixed.h.

◆ operator<() [2/2]

bool fixed::operator< ( int rvalue) const
inline

Definition at line 139 of file fixed.h.

◆ operator<<()

const fixed fixed::operator<< ( unsigned rvalue) const
inline

Definition at line 123 of file fixed.h.

◆ operator<<=()

fixed & fixed::operator<<= ( unsigned rvalue)
inline

Definition at line 121 of file fixed.h.

◆ operator<=() [1/2]

bool fixed::operator<= ( fixed const & rvalue) const
inline

Definition at line 132 of file fixed.h.

◆ operator<=() [2/2]

bool fixed::operator<= ( int rvalue) const
inline

Definition at line 141 of file fixed.h.

◆ operator==() [1/2]

bool fixed::operator== ( fixed const & rvalue) const
inline

Definition at line 128 of file fixed.h.

◆ operator==() [2/2]

bool fixed::operator== ( int rvalue) const
inline

Definition at line 143 of file fixed.h.

◆ operator>() [1/2]

bool fixed::operator> ( fixed const & rvalue) const
inline

Definition at line 131 of file fixed.h.

◆ operator>() [2/2]

bool fixed::operator> ( int rvalue) const
inline

Definition at line 140 of file fixed.h.

◆ operator>=() [1/2]

bool fixed::operator>= ( fixed const & rvalue) const
inline

Definition at line 133 of file fixed.h.

◆ operator>=() [2/2]

bool fixed::operator>= ( int rvalue) const
inline

Definition at line 142 of file fixed.h.

◆ operator>>()

const fixed fixed::operator>> ( unsigned rvalue) const
inline

Definition at line 122 of file fixed.h.

◆ operator>>=()

fixed & fixed::operator>>= ( unsigned rvalue)
inline

Definition at line 120 of file fixed.h.

◆ Round()

void fixed::Round ( void )
inline

Definition at line 169 of file fixed.h.

◆ Round_Down()

void fixed::Round_Down ( void )
inline

Definition at line 168 of file fixed.h.

◆ Round_Up()

void fixed::Round_Up ( void )
inline

Definition at line 167 of file fixed.h.

◆ Saturate() [1/2]

void fixed::Saturate ( fixed const & capvalue)
inline

Definition at line 171 of file fixed.h.

◆ Saturate() [2/2]

void fixed::Saturate ( unsigned capvalue)
inline

Definition at line 170 of file fixed.h.

◆ Sub_Saturate() [1/2]

void fixed::Sub_Saturate ( fixed const & capvalue)
inline

Definition at line 173 of file fixed.h.

◆ Sub_Saturate() [2/2]

void fixed::Sub_Saturate ( unsigned capvalue)
inline

Definition at line 172 of file fixed.h.

◆ To_ASCII()

int fixed::To_ASCII ( char * buffer,
int maxlen = -1 ) const

Definition at line 173 of file fixed.cpp.

Friends And Related Symbol Documentation

◆ Inverse

const fixed Inverse ( fixed const & value)
friend

Definition at line 187 of file fixed.h.

◆ operator!=

bool operator!= ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 158 of file fixed.h.

◆ operator*

const int operator* ( int lvalue,
fixed const & rvalue )
friend

Definition at line 149 of file fixed.h.

◆ operator*=

int operator*= ( int & lvalue,
fixed const & rvalue )
friend

Definition at line 159 of file fixed.h.

◆ operator+

const int operator+ ( int lvalue,
fixed const & rvalue )
friend

Definition at line 151 of file fixed.h.

◆ operator+=

int operator+= ( int & lvalue,
fixed const & rvalue )
friend

Definition at line 161 of file fixed.h.

◆ operator-

const int operator- ( int lvalue,
fixed const & rvalue )
friend

Definition at line 152 of file fixed.h.

◆ operator-=

int operator-= ( int & lvalue,
fixed const & rvalue )
friend

Definition at line 162 of file fixed.h.

◆ operator/

const int operator/ ( int lvalue,
fixed const & rvalue )
friend

Definition at line 150 of file fixed.h.

◆ operator/=

int operator/= ( int & lvalue,
fixed const & rvalue )
friend

Definition at line 160 of file fixed.h.

◆ operator<

bool operator< ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 153 of file fixed.h.

◆ operator<=

bool operator<= ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 155 of file fixed.h.

◆ operator==

bool operator== ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 157 of file fixed.h.

◆ operator>

bool operator> ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 154 of file fixed.h.

◆ operator>=

bool operator>= ( unsigned lvalue,
fixed const & rvalue )
friend

Definition at line 156 of file fixed.h.

◆ Round

const fixed Round ( fixed const & value)
friend

Definition at line 182 of file fixed.h.

◆ Round_Down

const fixed Round_Down ( fixed const & value)
friend

Definition at line 181 of file fixed.h.

◆ Round_Up

const fixed Round_Up ( fixed const & value)
friend

Definition at line 180 of file fixed.h.

◆ Saturate [1/2]

const fixed Saturate ( fixed const & value,
fixed const & capvalue )
friend

Definition at line 184 of file fixed.h.

◆ Saturate [2/2]

const fixed Saturate ( fixed const & value,
unsigned capvalue )
friend

Definition at line 183 of file fixed.h.

◆ Sub_Saturate [1/2]

const fixed Sub_Saturate ( fixed const & value,
fixed const & capvalue )
friend

Definition at line 186 of file fixed.h.

◆ Sub_Saturate [2/2]

const fixed Sub_Saturate ( fixed const & value,
unsigned capvalue )
friend

Definition at line 185 of file fixed.h.

Member Data Documentation

◆ _1_2

const fixed fixed::_1_2
static

Definition at line 198 of file fixed.h.

◆ _1_3

const fixed fixed::_1_3
static

Definition at line 199 of file fixed.h.

◆ _1_4

const fixed fixed::_1_4
static

Definition at line 200 of file fixed.h.

◆ _2_3

const fixed fixed::_2_3
static

Definition at line 202 of file fixed.h.

◆ _3_4

const fixed fixed::_3_4
static

Definition at line 201 of file fixed.h.

◆ [struct]

struct { ... } fixed::Composite

◆ Fraction

unsigned char fixed::Fraction

Definition at line 211 of file fixed.h.

◆ Raw

unsigned short fixed::Raw

Definition at line 215 of file fixed.h.

◆ Whole

unsigned char fixed::Whole

Definition at line 212 of file fixed.h.


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