Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcFixed Class Reference

Fixed math class, designed to work like a native type. More...

List of all members.

Public Member Functions

 XFcFixed ()
 XFcFixed (int aArg)
 XFcFixed (INT8 aArg)
 XFcFixed (UINT8 aArg)
 XFcFixed (INT16 aArg)
 XFcFixed (UINT16 aArg)
 XFcFixed (INT32 aArg)
 XFcFixed (UINT32 aArg)
 XFcFixed (FLOAT32 aArg)
 XFcFixed (FLOAT64 aArg)
 XFcFixed (INT32 aArg, UINT32)
 operator int ()
 operator INT8 ()
 operator UINT8 ()
 operator INT16 ()
 operator UINT16 ()
 operator INT32 ()
 operator UINT32 ()
 operator FLOAT32 ()
 operator FLOAT64 ()
XFcFixed operator() (int aArg)
XFcFixed operator() (INT8 aArg)
XFcFixed operator() (UINT8 aArg)
XFcFixed operator() (INT32 aArg)
XFcFixed operator() (UINT32 aArg)
XFcFixed operator() (FLOAT32 aArg)
XFcFixed operator() (FLOAT64 aArg)
XFcFixed & operator+= (const XFcFixed &aArg)
XFcFixed & operator+= (int aArg)
XFcFixed & operator+= (INT32 aArg)
XFcFixed & operator+= (FLOAT32 aArg)
XFcFixed & operator+= (FLOAT64 aArg)
XFcFixed & operator-= (const XFcFixed &aArg)
XFcFixed & operator-= (int aArg)
XFcFixed & operator-= (INT32 aArg)
XFcFixed & operator-= (FLOAT32 aArg)
XFcFixed & operator-= (FLOAT64 aArg)
XFcFixed & operator *= (const XFcFixed &aArg)
XFcFixed & operator *= (int aArg)
XFcFixed & operator *= (INT32 aArg)
XFcFixed & operator *= (FLOAT32 aArg)
XFcFixed & operator *= (FLOAT64 aArg)
XFcFixed operator * (const XFcFixed &aArg) const
XFcFixed operator * (int aArg) const
XFcFixed operator * (INT32 aArg) const
XFcFixed operator * (FLOAT32 aArg) const
XFcFixed operator * (FLOAT64 aArg) const
XFcFixed & operator/= (const XFcFixed &aArg)
XFcFixed & operator/= (int aArg)
XFcFixed & operator/= (INT32 aArg)
XFcFixed & operator/= (FLOAT32 aArg)
XFcFixed & operator/= (FLOAT64 aArg)
XFcFixed operator/ (int aArg) const
XFcFixed operator/ (INT32 aArg) const
XFcFixed operator/ (FLOAT32 aArg) const
XFcFixed operator/ (FLOAT64 aArg) const
INT32 operator== (const XFcFixed &aArg) const
INT32 operator== (int aArg) const
INT32 operator== (INT32 aArg) const
INT32 operator== (FLOAT32 aArg) const
INT32 operator== (FLOAT64 aArg) const
INT32 operator!= (const XFcFixed &aArg) const
INT32 operator!= (int aArg) const
INT32 operator!= (INT32 aArg) const
INT32 operator!= (FLOAT32 aArg) const
INT32 operator!= (FLOAT64 aArg) const
INT32 operator> (const XFcFixed &aArg) const
INT32 operator> (int aArg) const
INT32 operator> (INT32 aArg) const
INT32 operator> (FLOAT32 aArg) const
INT32 operator> (FLOAT64 aArg) const
INT32 operator< (const XFcFixed &aArg) const
INT32 operator< (int aArg) const
INT32 operator< (INT32 aArg) const
INT32 operator< (FLOAT32 aArg) const
INT32 operator< (FLOAT64 aArg) const
INT32 operator>= (const XFcFixed &aArg) const
INT32 operator>= (int aArg) const
INT32 operator>= (INT32 aArg) const
INT32 operator>= (FLOAT32 aArg) const
INT32 operator>= (FLOAT64 aArg) const
INT32 operator<= (const XFcFixed &aArg) const
INT32 operator<= (int aArg) const
INT32 operator<= (INT32 aArg) const
INT32 operator<= (FLOAT32 aArg) const
INT32 operator<= (FLOAT64 aArg) const
void trunc ()
void frac ()
XFcFixed operator- () const
void setValue (INT32 aValue)
INT32 getValue () const

Public Attributes

INT32 mValue

Friends

XFcFixed operator+ (const XFcFixed &aFixed1, const XFcFixed &aFixed2)
XFcFixed operator+ (const XFcFixed &aFixed, int aArg)
XFcFixed operator+ (const XFcFixed &aFixed, INT32 aArg)
XFcFixed operator+ (const XFcFixed &aFixed, FLOAT32 aArg)
XFcFixed operator+ (const XFcFixed &aFixed, FLOAT64 aArg)
XFcFixed operator+ (int aInt, const XFcFixed &aFixed)
XFcFixed operator+ (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator+ (FLOAT32 aInt, const XFcFixed &aFixed)
XFcFixed operator+ (FLOAT64 aInt, const XFcFixed &aFixed)
XFcFixed operator- (const XFcFixed &aFixed1, const XFcFixed &aFixed2)
XFcFixed operator- (const XFcFixed &aFixed, int aArg)
XFcFixed operator- (const XFcFixed &aFixed, INT32 aArg)
XFcFixed operator- (const XFcFixed &aFixed, FLOAT32 aArg)
XFcFixed operator- (const XFcFixed &aFixed, FLOAT64 aArg)
XFcFixed operator- (int aInt, const XFcFixed &aFixed)
XFcFixed operator- (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator- (FLOAT32 aInt, const XFcFixed &aFixed)
XFcFixed operator- (FLOAT64 aInt, const XFcFixed &aFixed)
XFcFixed operator * (int aInt, const XFcFixed &aFixed)
XFcFixed operator * (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator * (FLOAT32 aFloat, const XFcFixed &aFixed)
XFcFixed operator * (FLOAT64 aDouble, const XFcFixed &aFixed)
XFcFixed operator/ (const XFcFixed &aArg1, const XFcFixed &aArg2)
XFcFixed operator/ (int aInt, const XFcFixed &aFixed)
XFcFixed operator/ (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator/ (FLOAT32 aFloat, const XFcFixed &aFixed)
XFcFixed operator/ (FLOAT64 aDouble, const XFcFixed &aFixed)
INT32 operator== (int aArg, const XFcFixed &aFixed)
INT32 operator== (INT32 aArg, const XFcFixed &aFixed)
INT32 operator== (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator== (FLOAT64 aArg, const XFcFixed &aFixed)
INT32 operator!= (int aArg, const XFcFixed &aFixed)
INT32 operator!= (INT32 aArg, const XFcFixed &aFixed)
INT32 operator!= (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator!= (FLOAT64 aArg, const XFcFixed &aFixed)
INT32 operator> (int aArg, const XFcFixed &aFixed)
INT32 operator> (INT32 aArg, const XFcFixed &aFixed)
INT32 operator> (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator> (FLOAT64 aArg, const XFcFixed &aFixed)
INT32 operator< (int aArg, const XFcFixed &aFixed)
INT32 operator< (INT32 aArg, const XFcFixed &aFixed)
INT32 operator< (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator< (FLOAT64 aArg, const XFcFixed &aFixed)
INT32 operator>= (int aArg, const XFcFixed &aFixed)
INT32 operator>= (INT32 aArg, const XFcFixed &aFixed)
INT32 operator>= (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator>= (FLOAT64 aArg, const XFcFixed &aFixed)
INT32 operator<= (int aArg, const XFcFixed &aFixed)
INT32 operator<= (INT32 aArg, const XFcFixed &aFixed)
INT32 operator<= (FLOAT32 aArg, const XFcFixed &aFixed)
INT32 operator<= (FLOAT64 aArg, const XFcFixed &aFixed)


Detailed Description

Fixed math class, designed to work like a native type.

Internally, the XFcFixed class uses 16.16 bit fixed point notation. Functionally it acts like a floating point value, and in most cases it is fully interchangeable with a float. Care has been taken to ensure proper inlining whenever neccessary, and expensive operations have assembler-optimized versions under ARM platforms.

Note:
You should never store a XFcFixed value on disk, as the internal precision as well as byte order may differ from platform to platform. Convert to FLOAT32 and store that instead.


Constructor & Destructor Documentation

XFcFixed::XFcFixed   [inline]
 

XFcFixed::XFcFixed int    aArg [inline]
 

XFcFixed::XFcFixed INT8    aArg [inline]
 

XFcFixed::XFcFixed UINT8    aArg [inline]
 

XFcFixed::XFcFixed INT16    aArg [inline]
 

XFcFixed::XFcFixed UINT16    aArg [inline]
 

XFcFixed::XFcFixed INT32    aArg [inline]
 

XFcFixed::XFcFixed UINT32    aArg [inline]
 

XFcFixed::XFcFixed FLOAT32    aArg [inline]
 

XFcFixed::XFcFixed FLOAT64    aArg [inline]
 

XFcFixed::XFcFixed INT32    aArg,
UINT32   
[inline]
 


Member Function Documentation

void XFcFixed::frac   [inline]
 

INT32 XFcFixed::getValue   const [inline]
 

XFcFixed XFcFixed::operator * FLOAT64    aArg const [inline]
 

XFcFixed XFcFixed::operator * FLOAT32    aArg const [inline]
 

XFcFixed XFcFixed::operator * INT32    aArg const [inline]
 

XFcFixed XFcFixed::operator * int    aArg const [inline]
 

XFcFixed XFcFixed::operator * const XFcFixed &    aArg const [inline]
 

XFcFixed& XFcFixed::operator *= FLOAT64    aArg [inline]
 

XFcFixed& XFcFixed::operator *= FLOAT32    aArg [inline]
 

XFcFixed& XFcFixed::operator *= INT32    aArg [inline]
 

XFcFixed& XFcFixed::operator *= int    aArg [inline]
 

XFcFixed& XFcFixed::operator *= const XFcFixed &    aArg [inline]
 

XFcFixed::operator FLOAT32   [inline]
 

XFcFixed::operator FLOAT64   [inline]
 

XFcFixed::operator int   [inline]
 

XFcFixed::operator INT16   [inline]
 

XFcFixed::operator INT32   [inline]
 

XFcFixed::operator INT8   [inline]
 

XFcFixed::operator UINT16   [inline]
 

XFcFixed::operator UINT32   [inline]
 

XFcFixed::operator UINT8   [inline]
 

INT32 XFcFixed::operator!= FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator!= FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator!= INT32    aArg const [inline]
 

INT32 XFcFixed::operator!= int    aArg const [inline]
 

INT32 XFcFixed::operator!= const XFcFixed &    aArg const [inline]
 

XFcFixed XFcFixed::operator() FLOAT64    aArg [inline]
 

XFcFixed XFcFixed::operator() FLOAT32    aArg [inline]
 

XFcFixed XFcFixed::operator() UINT32    aArg [inline]
 

XFcFixed XFcFixed::operator() INT32    aArg [inline]
 

XFcFixed XFcFixed::operator() UINT8    aArg [inline]
 

XFcFixed XFcFixed::operator() INT8    aArg [inline]
 

XFcFixed XFcFixed::operator() int    aArg [inline]
 

XFcFixed& XFcFixed::operator+= FLOAT64    aArg [inline]
 

XFcFixed& XFcFixed::operator+= FLOAT32    aArg [inline]
 

XFcFixed& XFcFixed::operator+= INT32    aArg [inline]
 

XFcFixed& XFcFixed::operator+= int    aArg [inline]
 

XFcFixed& XFcFixed::operator+= const XFcFixed &    aArg [inline]
 

XFcFixed XFcFixed::operator-   const [inline]
 

XFcFixed& XFcFixed::operator-= FLOAT64    aArg [inline]
 

XFcFixed& XFcFixed::operator-= FLOAT32    aArg [inline]
 

XFcFixed& XFcFixed::operator-= INT32    aArg [inline]
 

XFcFixed& XFcFixed::operator-= int    aArg [inline]
 

XFcFixed& XFcFixed::operator-= const XFcFixed &    aArg [inline]
 

XFcFixed XFcFixed::operator/ FLOAT64    aArg const [inline]
 

XFcFixed XFcFixed::operator/ FLOAT32    aArg const [inline]
 

XFcFixed XFcFixed::operator/ INT32    aArg const [inline]
 

XFcFixed XFcFixed::operator/ int    aArg const [inline]
 

XFcFixed& XFcFixed::operator/= FLOAT64    aArg [inline]
 

XFcFixed& XFcFixed::operator/= FLOAT32    aArg [inline]
 

XFcFixed& XFcFixed::operator/= INT32    aArg [inline]
 

XFcFixed& XFcFixed::operator/= int    aArg [inline]
 

XFcFixed& XFcFixed::operator/= const XFcFixed &    aArg [inline]
 

INT32 XFcFixed::operator< FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator< FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator< INT32    aArg const [inline]
 

INT32 XFcFixed::operator< int    aArg const [inline]
 

INT32 XFcFixed::operator< const XFcFixed &    aArg const [inline]
 

INT32 XFcFixed::operator<= FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator<= FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator<= INT32    aArg const [inline]
 

INT32 XFcFixed::operator<= int    aArg const [inline]
 

INT32 XFcFixed::operator<= const XFcFixed &    aArg const [inline]
 

INT32 XFcFixed::operator== FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator== FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator== INT32    aArg const [inline]
 

INT32 XFcFixed::operator== int    aArg const [inline]
 

INT32 XFcFixed::operator== const XFcFixed &    aArg const [inline]
 

INT32 XFcFixed::operator> FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator> FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator> INT32    aArg const [inline]
 

INT32 XFcFixed::operator> int    aArg const [inline]
 

INT32 XFcFixed::operator> const XFcFixed &    aArg const [inline]
 

INT32 XFcFixed::operator>= FLOAT64    aArg const [inline]
 

INT32 XFcFixed::operator>= FLOAT32    aArg const [inline]
 

INT32 XFcFixed::operator>= INT32    aArg const [inline]
 

INT32 XFcFixed::operator>= int    aArg const [inline]
 

INT32 XFcFixed::operator>= const XFcFixed &    aArg const [inline]
 

void XFcFixed::setValue INT32    aValue [inline]
 

void XFcFixed::trunc   [inline]
 


Friends And Related Function Documentation

XFcFixed operator * FLOAT64    aFLOAT64,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator * FLOAT32    aFLOAT32,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator * INT32    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator * int    aInt,
const XFcFixed &    aFixed
[friend]
 

INT32 operator!= FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator!= FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator!= INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator!= int    aArg,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator+ FLOAT64    aFLOAT64,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator+ FLOAT32    aFLOAT32,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator+ INT32    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator+ int    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator+ const XFcFixed &    aFixed,
FLOAT64    aArg
[friend]
 

XFcFixed operator+ const XFcFixed &    aFixed,
FLOAT32    aArg
[friend]
 

XFcFixed operator+ const XFcFixed &    aFixed,
INT32    aArg
[friend]
 

XFcFixed operator+ const XFcFixed &    aFixed,
int    aArg
[friend]
 

XFcFixed operator+ const XFcFixed &    aFixed1,
const XFcFixed &    aFixed2
[friend]
 

XFcFixed operator- FLOAT64    aFLOAT64,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator- FLOAT32    aFLOAT32,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator- INT32    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator- int    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator- const XFcFixed &    aFixed,
FLOAT64    aArg
[friend]
 

XFcFixed operator- const XFcFixed &    aFixed,
FLOAT32    aArg
[friend]
 

XFcFixed operator- const XFcFixed &    aFixed,
INT32    aArg
[friend]
 

XFcFixed operator- const XFcFixed &    aFixed,
int    aArg
[friend]
 

XFcFixed operator- const XFcFixed &    aFixed1,
const XFcFixed &    aFixed2
[friend]
 

XFcFixed operator/ FLOAT64    aFLOAT64,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator/ FLOAT32    aFLOAT32,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator/ INT32    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator/ int    aInt,
const XFcFixed &    aFixed
[friend]
 

XFcFixed operator/ const XFcFixed &    aArg1,
const XFcFixed &    aArg2
[friend]
 

INT32 operator< FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator< FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator< INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator< int    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator<= FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator<= FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator<= INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator<= int    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator== FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator== FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator== INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator== int    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator> FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator> FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator> INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator> int    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator>= FLOAT64    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator>= FLOAT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator>= INT32    aArg,
const XFcFixed &    aFixed
[friend]
 

INT32 operator>= int    aArg,
const XFcFixed &    aFixed
[friend]
 


Member Data Documentation

INT32 XFcFixed::mValue
 


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch