Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fix Class Reference

#include <Fix.h>

List of all members.

Public Types

enum  FixDef { Precision = 16, IntMask = 0xffff0000, FractMask = 0x0000ffff }

Public Member Functions

 fix ()
 fix (int n)
 fix (double d)
 fix (const fix &f)
 operator int () const
 operator float () const
 operator double () const
fixoperator= (const fix &f)
fixoperator= (int n)
fixoperator= (double d)
int operator== (const fix &f) const
int operator!= (const fix &f) const
int operator<= (const fix &f) const
int operator>= (const fix &f) const
int operator< (const fix &f) const
int operator> (const fix &f) const
fix operator+ (const fix &f) const
fix operator- (const fix &f) const
fix operator* (const fix &f) const
fix operator/ (const fix &f) const
fixoperator+= (const fix &f)
fixoperator-= (const fix &f)
fixoperator*= (const fix &f)
fixoperator/= (const fix &f)
fix operator+ (int n) const
fix operator- (int n) const
fix operator* (int n) const
fix operator/ (int n) const
fixoperator+= (int n)
fixoperator-= (int n)
fixoperator*= (int n)
fixoperator/= (int n)
fix operator+ (double d) const
fix operator- (double d) const
fix operator* (double d) const
fix operator/ (double d) const
fixoperator+= (double d)
fixoperator-= (double d)
fixoperator*= (double d)
fixoperator/= (double d)
fix truncate () const
fix fraction () const
fix floor () const
fix ceil () const
fix adjust_up () const
fix adjust_down () const
fix muldiv (const fix &num, const fix &den) const

Static Public Member Functions

static const char * TYPENAME ()

Public Attributes

long val

Static Public Attributes

static const fix one = fix(1)
static const fix two = fix(2)
static const fix three = fix(3)
static const fix five = fix(5)
static const fix ten = fix(10)

Detailed Description

Definition at line 40 of file Fix.h.


Member Enumeration Documentation

Enumerator:
Precision 
IntMask 
FractMask 

Definition at line 45 of file Fix.h.


Constructor & Destructor Documentation

fix::fix ( )
inline

Definition at line 52 of file Fix.h.

fix::fix ( int  n)
inline

Definition at line 53 of file Fix.h.

fix::fix ( double  d)
inline

Definition at line 54 of file Fix.h.

fix::fix ( const fix f)
inline

Definition at line 64 of file Fix.h.


Member Function Documentation

fix fix::adjust_down ( ) const
inline

Definition at line 161 of file Fix.h.

fix fix::adjust_up ( ) const
inline

Definition at line 160 of file Fix.h.

fix fix::ceil ( ) const
inline

Definition at line 159 of file Fix.h.

fix fix::floor ( ) const
inline

Definition at line 158 of file Fix.h.

fix fix::fraction ( ) const
inline

Definition at line 157 of file Fix.h.

fix fix::muldiv ( const fix num,
const fix den 
) const
inline

Definition at line 163 of file Fix.h.

fix::operator double ( ) const
inline

Definition at line 69 of file Fix.h.

fix::operator float ( ) const
inline

Definition at line 68 of file Fix.h.

fix::operator int ( ) const
inline

Definition at line 67 of file Fix.h.

int fix::operator!= ( const fix f) const
inline

Definition at line 83 of file Fix.h.

fix fix::operator* ( const fix f) const
inline

Definition at line 92 of file Fix.h.

fix fix::operator* ( int  n) const
inline

Definition at line 137 of file Fix.h.

fix fix::operator* ( double  d) const
inline

Definition at line 146 of file Fix.h.

fix& fix::operator*= ( const fix f)
inline

Definition at line 114 of file Fix.h.

fix& fix::operator*= ( int  n)
inline

Definition at line 141 of file Fix.h.

fix& fix::operator*= ( double  d)
inline

Definition at line 150 of file Fix.h.

fix fix::operator+ ( const fix f) const
inline

Definition at line 90 of file Fix.h.

fix fix::operator+ ( int  n) const
inline

Definition at line 135 of file Fix.h.

fix fix::operator+ ( double  d) const
inline

Definition at line 144 of file Fix.h.

fix& fix::operator+= ( const fix f)
inline

Definition at line 112 of file Fix.h.

fix& fix::operator+= ( int  n)
inline

Definition at line 139 of file Fix.h.

fix& fix::operator+= ( double  d)
inline

Definition at line 148 of file Fix.h.

fix fix::operator- ( const fix f) const
inline

Definition at line 91 of file Fix.h.

fix fix::operator- ( int  n) const
inline

Definition at line 136 of file Fix.h.

fix fix::operator- ( double  d) const
inline

Definition at line 145 of file Fix.h.

fix& fix::operator-= ( const fix f)
inline

Definition at line 113 of file Fix.h.

fix& fix::operator-= ( int  n)
inline

Definition at line 140 of file Fix.h.

fix& fix::operator-= ( double  d)
inline

Definition at line 149 of file Fix.h.

fix fix::operator/ ( const fix f) const
inline

Definition at line 101 of file Fix.h.

fix fix::operator/ ( int  n) const
inline

Definition at line 138 of file Fix.h.

fix fix::operator/ ( double  d) const
inline

Definition at line 147 of file Fix.h.

fix& fix::operator/= ( const fix f)
inline

Definition at line 123 of file Fix.h.

fix& fix::operator/= ( int  n)
inline

Definition at line 142 of file Fix.h.

fix& fix::operator/= ( double  d)
inline

Definition at line 152 of file Fix.h.

int fix::operator< ( const fix f) const
inline

Definition at line 86 of file Fix.h.

int fix::operator<= ( const fix f) const
inline

Definition at line 84 of file Fix.h.

fix& fix::operator= ( const fix f)
inline

Definition at line 72 of file Fix.h.

fix& fix::operator= ( int  n)
inline

Definition at line 73 of file Fix.h.

fix& fix::operator= ( double  d)
inline

Definition at line 74 of file Fix.h.

int fix::operator== ( const fix f) const
inline

Definition at line 82 of file Fix.h.

int fix::operator> ( const fix f) const
inline

Definition at line 87 of file Fix.h.

int fix::operator>= ( const fix f) const
inline

Definition at line 85 of file Fix.h.

fix fix::truncate ( ) const
inline

Definition at line 156 of file Fix.h.

static const char* fix::TYPENAME ( )
inlinestatic

Definition at line 43 of file Fix.h.


Member Data Documentation

const fix fix::five = fix(5)
static

Definition at line 49 of file Fix.h.

const fix fix::one = fix(1)
static

Definition at line 46 of file Fix.h.

const fix fix::ten = fix(10)
static

Definition at line 50 of file Fix.h.

const fix fix::three = fix(3)
static

Definition at line 48 of file Fix.h.

const fix fix::two = fix(2)
static

Definition at line 47 of file Fix.h.

long fix::val

Definition at line 176 of file Fix.h.


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