#include <fixed24.h>
Public Member Functions | |
fixed24 () | |
fixed24 (const fixed24 &) | |
Default constructor for FIXED24. It does not actually do anything! Copy constructor. | |
fixed24 (INT32) | |
Constructor. | |
fixed24 (short) | |
Constructor. | |
fixed24 (double) | |
Constructor. | |
fixed24 & | operator= (const fixed24 &) |
Overloading the assignment operator for FIXED24s. | |
fixed24 & | operator= (const INT32) |
Overloading the assignment operator for FIXED24s. | |
fixed24 & | operator= (const short) |
Overloading the assignment operator for FIXED24s. | |
fixed24 & | operator= (const double) |
Overloading the assignment operator for FIXED24s. | |
fixed24 & | operator+= (const fixed24 &) |
Overloading the plus-equals operator for FIXED24s. | |
fixed24 & | operator+= (const short) |
Overloading the plus-equals operator for FIXED24s. | |
fixed24 & | operator-= (const fixed24 &) |
Overloading the minus-equals operator for FIXED24s. | |
fixed24 & | operator-= (const short) |
Overloading the minus-equals operator for FIXED24s. | |
fixed24 & | operator *= (const fixed24 &) |
Overloading the times-equals operator for FIXED24s. | |
fixed24 & | operator *= (const short) |
Overloading the times-equals operator for FIXED24s. | |
fixed24 & | operator/= (const fixed24 &) |
Overloading the divide-equals operator for FIXED24s. | |
fixed24 & | operator/= (const short) |
Overloading the divide-equals operator for FIXED24s. | |
fixed24 & | operator<<= (const UINT32) |
Overloading the left-shift-equals operator for FIXED24s. | |
fixed24 & | operator>>= (const UINT32) |
Overloading the right-shift-equals operator for FIXED24s. | |
fixed24 & | operator++ () |
Overloading the prefix plus-plus operator for FIXED24s. | |
fixed24 | operator++ (INT32) |
Overloading the postfix plus-plus operator for FIXED24s. | |
fixed24 & | operator-- () |
Overloading the prefix minus-minus operator for FIXED24s. | |
fixed24 | operator-- (INT32) |
Overloading the postfix minus-minus operator for FIXED24s. | |
INT32 | MakeInt () const |
converts a FIXED24 to an integer. | |
short | MakeShort () const |
converts a FIXED24 to an integer. | |
double | MakeDouble () const |
Makes a double (32-bit signed value) out of a fixed point 24-bit value. | |
INT32 | MakeLong () const |
converts a FIXED24 to a INT32. | |
xlong | MakeXlong () const |
converts a FIXED24 to a INT32. | |
INT32 | GetAsFixed24 (void) |
converts a FIXED24 to an 8.24 bit fixed point value stored in a INT32. (i.e. pulls the 8.24 data word directly out of the FIXED24, though obviously if the storage model in a fixed24 changes in the future we can change this access function to still return a 8.24 INT32) | |
void | SetAsFixed24 (INT32 NewValue) |
Sets a FIXED24 to an 8.24 bit fixed point value stored in a INT32. (i.e. plonks the 8.24 data word directly into the FIXED24, though obviously if the storage model in a fixed24 changes in the future we can change this access function to still accept a 8.24 INT32). | |
Static Public Member Functions | |
static fixed24 | FromRawLong (INT32 d) |
converts an INT32 to a FIXED24. | |
Public Attributes | |
INT32 | all |
Friends | |
fixed24 CCAPI | operator+ (const fixed24 &, const fixed24 &) |
Overloading the addition operator for FIXED24s. | |
fixed24 CCAPI | operator- (const fixed24 &, const fixed24 &) |
Overloading the subtract operator for FIXED24s. | |
fixed24 CCAPI | operator- (const fixed24 &) |
Overloading the negation operator for FIXED24s. Should be inline. | |
fixed24 CCAPI | operator * (const fixed24 &, const fixed24 &) |
Overloading the multiplication operator for FIXED24s. | |
fixed24 CCAPI | operator/ (const fixed24 &, const fixed24 &) |
Overloading the division operator for FIXED24s. | |
fixed24 CCAPI | operator>> (const fixed24 &, UINT32) |
Overloading the >> operator to mean shift right for FIXED24s. | |
fixed24 CCAPI | operator<< (const fixed24 &, UINT32) |
Overloading the << operator to mean shift left for FIXED24s. | |
INT32 CCAPI | operator== (const fixed24 &, const fixed24 &) |
Overloading the equality operator for FIXED24s. | |
INT32 CCAPI | operator!= (const fixed24 &, const fixed24 &) |
Overloading the inequality operator for FIXED24s. | |
INT32 CCAPI | operator> (const fixed24 &, const fixed24 &) |
Overloading the greater-than operator for FIXED24s. | |
INT32 CCAPI | operator< (const fixed24 &, const fixed24 &) |
Overloading the less-than operator for FIXED24s. | |
INT32 CCAPI | operator>= (const fixed24 &, const fixed24 &) |
Overloading the greater-than-equal-to operator for FIXED24s. | |
INT32 CCAPI | operator<= (const fixed24 &, const fixed24 &) |
Overloading the less-than-equal-to operator for FIXED24s. | |
INT32 CCAPI | operator== (const fixed24 &, const short) |
Overloading the equality operator for FIXED24s. | |
INT32 CCAPI | operator!= (const fixed24 &, const short) |
Overloading the inequality operator for FIXED24s. | |
INT32 CCAPI | operator> (const fixed24 &, const short) |
Overloading the greater-than operator for FIXED24s. | |
INT32 CCAPI | operator< (const fixed24 &, const short) |
Overloading the less-than operator for FIXED24s. | |
INT32 CCAPI | operator>= (const fixed24 &, const short) |
Overloading the greater-than-equal-to operator for FIXED24s. | |
INT32 CCAPI | operator<= (const fixed24 &, const short) |
Overloading the less-than-equal-to operator for FIXED24s. |
Definition at line 150 of file fixed24.h.
|
Definition at line 162 of file fixed24.h.
|
|
Default constructor for FIXED24. It does not actually do anything! Copy constructor.
Definition at line 296 of file fixed24.h.
|
|
Constructor.
Definition at line 315 of file fixed24.h. 00316 { 00317 all = SHORT_FIXED24( initValue ); 00318 }
|
|
Constructor.
Definition at line 334 of file fixed24.h. 00335 { 00336 all = SHORT_FIXED24( initValue ); 00337 }
|
|
Constructor.
Definition at line 354 of file fixed24.h. 00355 { 00356 *this = DoubleToFixed24(initValue); 00357 }
|
|
converts an INT32 to a FIXED24.
Definition at line 378 of file fixed24.h.
|
|
converts a FIXED24 to an 8.24 bit fixed point value stored in a INT32. (i.e. pulls the 8.24 data word directly out of the FIXED24, though obviously if the storage model in a fixed24 changes in the future we can change this access function to still return a 8.24 INT32)
Definition at line 406 of file fixed24.h.
|
|
Makes a double (32-bit signed value) out of a fixed point 24-bit value.
Definition at line 549 of file fixed24.h. 00550 { 00551 return Fixed24ToDouble(*this); 00552 }
|
|
converts a FIXED24 to an integer.
Definition at line 451 of file fixed24.h.
|
|
converts a FIXED24 to a INT32.
Definition at line 490 of file fixed24.h.
|
|
converts a FIXED24 to an integer.
Definition at line 471 of file fixed24.h.
|
|
converts a FIXED24 to a INT32.
Definition at line 509 of file fixed24.h.
|
|
Overloading the times-equals operator for FIXED24s.
Definition at line 834 of file fixed24.cpp. 00835 { 00836 fixed24 temp; 00837 00838 temp.all = SHORT_FIXED24( operand ); 00839 00840 F24ASSIGNTHIS = Fixed24Mul(*this, temp); 00841 00842 return *this; 00843 }
|
|
Overloading the times-equals operator for FIXED24s.
Definition at line 811 of file fixed24.cpp. 00812 { 00813 F24ASSIGNTHIS = Fixed24Mul(*this, operand); 00814 00815 return *this; 00816 }
|
|
Overloading the postfix plus-plus operator for FIXED24s.
Definition at line 973 of file fixed24.cpp. 00974 { 00975 fixed24 result = *this; 00976 00977 this->all += FIXED24_ONE; 00978 00979 return result; 00980 }
|
|
Overloading the prefix plus-plus operator for FIXED24s.
Definition at line 953 of file fixed24.cpp. 00954 { 00955 this->all += FIXED24_ONE; 00956 return *this; 00957 }
|
|
Overloading the plus-equals operator for FIXED24s.
Definition at line 747 of file fixed24.cpp. 00748 { 00749 this->all += SHORT_FIXED24( operand ); 00750 return *this; 00751 }
|
|
Overloading the plus-equals operator for FIXED24s.
Definition at line 726 of file fixed24.cpp.
|
|
Overloading the postfix minus-minus operator for FIXED24s.
Definition at line 1016 of file fixed24.cpp. 01017 { 01018 fixed24 result = *this; 01019 01020 this->all -= FIXED24_ONE; 01021 01022 return result; 01023 }
|
|
Overloading the prefix minus-minus operator for FIXED24s.
Definition at line 996 of file fixed24.cpp. 00997 { 00998 this->all -= FIXED24_ONE; 00999 return *this; 01000 }
|
|
Overloading the minus-equals operator for FIXED24s.
Definition at line 789 of file fixed24.cpp. 00790 { 00791 this->all -= SHORT_FIXED24( operand ); 00792 return *this; 00793 }
|
|
Overloading the minus-equals operator for FIXED24s.
Definition at line 768 of file fixed24.cpp.
|
|
Overloading the divide-equals operator for FIXED24s.
Definition at line 884 of file fixed24.cpp. 00885 { 00886 fixed24 temp; 00887 00888 temp.all = SHORT_FIXED24( operand ); 00889 00890 F24ASSIGNTHIS = Fixed24Div(*this, temp); 00891 00892 return *this; 00893 }
|
|
Overloading the divide-equals operator for FIXED24s.
Definition at line 861 of file fixed24.cpp. 00862 { 00863 F24ASSIGNTHIS = Fixed24Div(*this, operand); 00864 00865 return *this; 00866 }
|
|
Overloading the left-shift-equals operator for FIXED24s.
Definition at line 910 of file fixed24.cpp. 00911 { 00912 this->all <<= operand; 00913 return *this; 00914 }
|
|
Overloading the assignment operator for FIXED24s.
Definition at line 705 of file fixed24.cpp. 00706 { 00707 F24ASSIGNTHIS = DoubleToFixed24(operand); 00708 return *this; 00709 }
|
|
Overloading the assignment operator for FIXED24s.
Definition at line 569 of file fixed24.h. 00570 { 00571 this->all = SHORT_FIXED24( operand ); 00572 return *this; 00573 }
|
|
Overloading the assignment operator for FIXED24s.
Definition at line 684 of file fixed24.cpp. 00685 { 00686 this->all = SHORT_FIXED24( operand ); 00687 return *this; 00688 }
|
|
Overloading the assignment operator for FIXED24s.
Definition at line 528 of file fixed24.h.
|
|
Overloading the right-shift-equals operator for FIXED24s.
Definition at line 931 of file fixed24.cpp. 00932 { 00933 this->all >>= operand; 00934 return *this; 00935 }
|
|
Sets a FIXED24 to an 8.24 bit fixed point value stored in a INT32. (i.e. plonks the 8.24 data word directly into the FIXED24, though obviously if the storage model in a fixed24 changes in the future we can change this access function to still accept a 8.24 INT32).
Definition at line 430 of file fixed24.h. 00431 { 00432 all = NewValue; 00433 }
|
|
Overloading the multiplication operator for FIXED24s.
Definition at line 323 of file fixed24.cpp. 00324 { 00325 fixed24 result; 00326 00327 F24ASSIGN(result) = Fixed24Mul( operand1, operand2 ); 00328 00329 return result; 00330 }
|
|
Overloading the inequality operator for FIXED24s.
Definition at line 491 of file fixed24.cpp. 00492 { 00493 return operand1.all != SHORT_FIXED24( operand2 ); 00494 }
|
|
Overloading the inequality operator for FIXED24s.
Definition at line 469 of file fixed24.cpp.
|
|
Overloading the addition operator for FIXED24s.
Definition at line 250 of file fixed24.cpp. 00251 { 00252 fixed24 result; 00253 00254 result.all = operand1.all + operand2.all; 00255 00256 return result; 00257 }
|
|
Overloading the negation operator for FIXED24s. Should be inline.
Definition at line 298 of file fixed24.cpp.
|
|
Overloading the subtract operator for FIXED24s.
Definition at line 274 of file fixed24.cpp. 00275 { 00276 fixed24 result; 00277 00278 result.all = operand1.all - operand2.all; 00279 00280 return result; 00281 }
|
|
Overloading the division operator for FIXED24s.
Definition at line 348 of file fixed24.cpp. 00349 { 00350 fixed24 result; 00351 00352 F24ASSIGN(result) = Fixed24Div( operand1, operand2 ); 00353 00354 return result; 00355 00356 }
|
|
Overloading the less-than operator for FIXED24s.
Definition at line 577 of file fixed24.cpp. 00578 { 00579 return operand1.all < SHORT_FIXED24( operand2 ); 00580 }
|
|
Overloading the less-than operator for FIXED24s.
Definition at line 555 of file fixed24.cpp.
|
|
Overloading the << operator to mean shift left for FIXED24s.
Definition at line 399 of file fixed24.cpp. 00400 { 00401 fixed24 result; 00402 00403 result.all = operand1.all << operand2; 00404 00405 return result; 00406 }
|
|
Overloading the less-than-equal-to operator for FIXED24s.
Definition at line 663 of file fixed24.cpp. 00664 { 00665 return operand1.all <= SHORT_FIXED24( operand2 ); 00666 }
|
|
Overloading the less-than-equal-to operator for FIXED24s.
Definition at line 641 of file fixed24.cpp.
|
|
Overloading the equality operator for FIXED24s.
Definition at line 448 of file fixed24.cpp. 00449 { 00450 return operand1.all == SHORT_FIXED24( operand2 ); 00451 }
|
|
Overloading the equality operator for FIXED24s.
Definition at line 426 of file fixed24.cpp.
|
|
Overloading the greater-than operator for FIXED24s.
Definition at line 534 of file fixed24.cpp. 00535 { 00536 return operand1.all > SHORT_FIXED24(operand2); 00537 }
|
|
Overloading the greater-than operator for FIXED24s.
Definition at line 512 of file fixed24.cpp.
|
|
Overloading the greater-than-equal-to operator for FIXED24s.
Definition at line 620 of file fixed24.cpp. 00621 { 00622 return operand1.all >= SHORT_FIXED24( operand2 ); 00623 }
|
|
Overloading the greater-than-equal-to operator for FIXED24s.
Definition at line 598 of file fixed24.cpp.
|
|
Overloading the >> operator to mean shift right for FIXED24s.
Definition at line 374 of file fixed24.cpp. 00375 { 00376 fixed24 result; 00377 00378 result.all = operand1.all >> operand2; 00379 00380 return result; 00381 }
|
|
|