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

XFcFixed.h File Reference

Fixed point class. More...

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Compounds

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


Defines

#define HUGE_FLOAT   (3.402823466e+38F)
#define XFC_FIXEDMUL(a, b, c)   { INT64 res = (INT64)(a) * (INT64)(b); c = (INT32)(res >> XFCFIXED_SHIFT); }
#define XFC_FIXEDDIV(a, b, c)   { INT64 res = (INT64)(a) << XFCFIXED_SHIFT; res = res / (INT64)(b); c = (INT32)(res); }
#define REALf(a)   (XFcFixed(((INT32)((a) * XFCFIXED_SCALE)), 0))
#define REALi(a)   (XFcFixed(((INT32)((a) << XFCFIXED_SHIFT)), 0))
#define XFCREALTOFIXED16X16(a)   ((a).mValue << (16 - XFCFIXED_SHIFT))

Functions

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 aFLOAT32, const XFcFixed &aFixed)
XFcFixed operator+ (FLOAT64 aFLOAT64, 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- (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator- (int aInt, const XFcFixed &aFixed)
XFcFixed operator- (FLOAT32 aFLOAT32, const XFcFixed &aFixed)
XFcFixed operator- (FLOAT64 aFLOAT64, const XFcFixed &aFixed)
XFcFixed operator * (int aInt, const XFcFixed &aFixed)
XFcFixed operator * (INT32 aInt, const XFcFixed &aFixed)
XFcFixed operator * (FLOAT32 aFLOAT32, const XFcFixed &aFixed)
XFcFixed operator * (FLOAT64 aFLOAT64, 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 aFLOAT32, const XFcFixed &aFixed)
XFcFixed operator/ (FLOAT64 aFLOAT64, 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)
INT32 xfcFixedDiv16x16 (INT32 a, INT32 b)
INT32 xfcFixedDiv10x22 (INT32 a, INT32 b)
INT32 xfcFixedDiv11x21 (INT32 a, INT32 b)
INT32 xfcFixedMul16x16 (INT32 a, INT32 b)
INT32 xfcFixedMul10x22 (INT32 a, INT32 b)
XFcFixed abs (XFcFixed aArg)

Variables

const INT XFCFIXED_SHIFT = 16
 Fixed point position.

const INT32 XFCFIXED_MASK = ((1 << XFCFIXED_SHIFT) - 1)
 Fixed point lower part bitmask.

const FLOAT32 XFCFIXED_SCALE = 65536.0f
 Fixed point scale.


Detailed Description

Fixed point class.

X-Forge Core
Copyright 2000-2003 Fathammer Ltd

Id
XFcFixed.h,v 1.27 2003/03/21 12:38:09 jari Exp
Date
2003/03/21 12:38:09
Revision
1.27

Define Documentation

#define HUGE_FLOAT   (3.402823466e+38F)
 

#define REALf      (XFcFixed(((INT32)((a) * XFCFIXED_SCALE)), 0))
 

#define REALi      (XFcFixed(((INT32)((a) << XFCFIXED_SHIFT)), 0))
 

#define XFC_FIXEDDIV a,
b,
     { INT64 res = (INT64)(a) << XFCFIXED_SHIFT; res = res / (INT64)(b); c = (INT32)(res); }
 

#define XFC_FIXEDMUL a,
b,
     { INT64 res = (INT64)(a) * (INT64)(b); c = (INT32)(res >> XFCFIXED_SHIFT); }
 

#define XFCREALTOFIXED16X16      ((a).mValue << (16 - XFCFIXED_SHIFT))
 


Function Documentation

XFcFixed abs XFcFixed    aArg [inline]
 

XFcFixed operator * FLOAT64    aFLOAT64,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator * FLOAT32    aFLOAT32,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator * INT32    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator * int    aInt,
const XFcFixed   aFixed
[inline]
 

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

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

INT32 operator!= INT32    aArg,
const XFcFixed   aFixed
[inline]
 

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

XFcFixed operator+ FLOAT64    aFLOAT64,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator+ FLOAT32    aFLOAT32,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator+ INT32    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator+ int    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator+ const XFcFixed   aFixed,
FLOAT64    aArg
[inline]
 

XFcFixed operator+ const XFcFixed   aFixed,
FLOAT32    aArg
[inline]
 

XFcFixed operator+ const XFcFixed   aFixed,
INT32    aArg
[inline]
 

XFcFixed operator+ const XFcFixed   aFixed,
int    aArg
[inline]
 

XFcFixed operator+ const XFcFixed   aFixed1,
const XFcFixed   aFixed2
[inline]
 

XFcFixed operator- FLOAT64    aFLOAT64,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator- FLOAT32    aFLOAT32,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator- int    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator- INT32    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator- const XFcFixed   aFixed,
FLOAT64    aArg
[inline]
 

XFcFixed operator- const XFcFixed   aFixed,
FLOAT32    aArg
[inline]
 

XFcFixed operator- const XFcFixed   aFixed,
INT32    aArg
[inline]
 

XFcFixed operator- const XFcFixed   aFixed,
int    aArg
[inline]
 

XFcFixed operator- const XFcFixed   aFixed1,
const XFcFixed   aFixed2
[inline]
 

XFcFixed operator/ FLOAT64    aFLOAT64,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator/ FLOAT32    aFLOAT32,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator/ INT32    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator/ int    aInt,
const XFcFixed   aFixed
[inline]
 

XFcFixed operator/ const XFcFixed   aArg1,
const XFcFixed   aArg2
[inline]
 

INT32 operator< FLOAT64    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator< FLOAT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator< INT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator< int    aArg,
const XFcFixed   aFixed
[inline]
 

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

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

INT32 operator<= INT32    aArg,
const XFcFixed   aFixed
[inline]
 

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

INT32 operator== FLOAT64    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator== FLOAT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator== INT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator== int    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator> FLOAT64    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator> FLOAT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator> INT32    aArg,
const XFcFixed   aFixed
[inline]
 

INT32 operator> int    aArg,
const XFcFixed   aFixed
[inline]
 

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

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

INT32 operator>= INT32    aArg,
const XFcFixed   aFixed
[inline]
 

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

INT32 xfcFixedDiv10x22 INT32    a,
INT32    b
[inline]
 

INT32 xfcFixedDiv11x21 INT32    a,
INT32    b
[inline]
 

INT32 xfcFixedDiv16x16 INT32    a,
INT32    b
[inline]
 

INT32 xfcFixedMul10x22 INT32    a,
INT32    b
[inline]
 

INT32 xfcFixedMul16x16 INT32    a,
INT32    b
[inline]
 


Variable Documentation

const INT32 XFCFIXED_MASK = ((1 << XFCFIXED_SHIFT) - 1) [static]
 

Fixed point lower part bitmask.

const FLOAT32 XFCFIXED_SCALE = 65536.0f [static]
 

Fixed point scale.

const INT XFCFIXED_SHIFT = 16 [static]
 

Fixed point position.


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