fixed.cpp File Reference

#include <QString>
#include <QChar>
#include "stdio.h"
#include "fixed.h"
#include "funcaux.h"

Go to the source code of this file.

Functions

Fixed operator+ (Fixed x, Fixed y)
Fixed operator+ (Fixed x, int y)
Fixed operator/ (Fixed x, Fixed y)
Fixed operator/ (Fixed x, int y)
Fixed operator/ (int x, Fixed y)
bool operator== (Fixed x, Fixed y)
bool operator== (Fixed x, int y)
bool operator== (int x, Fixed y)
bool operator< (Fixed x, Fixed y)
bool operator< (Fixed x, int y)
bool operator< (int x, Fixed y)
Fixed operator- (Fixed x)
Fixed operator * (Fixed x, int y)
Fixed operator * (Fixed x, Fixed y)
Fixed operator- (Fixed x, Fixed y)
Fixed operator- (Fixed x, int y)
Fixed operator- (int x, Fixed y)


Function Documentation

Fixed operator * ( Fixed  x,
Fixed  y 
)

Definition at line 287 of file fixed.cpp.

References Fixed::precision, and Fixed::value.

00287                                     {
00288     x.value = x.value * y.value;
00289     x.precision = x.precision + y.precision;
00290     return x;
00291 }

Fixed operator * ( Fixed  x,
int  y 
)

Definition at line 282 of file fixed.cpp.

00282                                   {
00283     return x * Fixed(y, 0);
00284 }

Fixed operator+ ( Fixed  x,
int  y 
)

Definition at line 73 of file fixed.cpp.

00073                                   {
00074     return x + Fixed(y, 0);
00075 }

Fixed operator+ ( Fixed  x,
Fixed  y 
)

Definition at line 65 of file fixed.cpp.

References Fixed::equalize_precision(), and Fixed::value.

00065                                     {
00066     x.equalize_precision(y);
00067     x.value = x.value + y.value;
00068     return x;
00069 }

Fixed operator- ( int  x,
Fixed  y 
)

Definition at line 314 of file fixed.cpp.

00314                                   {
00315     return Fixed(x, 0) - y;
00316 }

Fixed operator- ( Fixed  x,
int  y 
)

Definition at line 309 of file fixed.cpp.

00309                                   {
00310     return x - Fixed(y, 0);
00311 }

Fixed operator- ( Fixed  x,
Fixed  y 
)

Definition at line 302 of file fixed.cpp.

References Fixed::equalize_precision(), and Fixed::value.

00302                                     {
00303     x.equalize_precision(y);
00304     x.value = x.value - y.value;
00305     return x;
00306 }

Fixed operator- ( Fixed  x  ) 

Definition at line 276 of file fixed.cpp.

References Fixed::value.

00276                            {
00277     x.value = -x.value;
00278     return x;
00279 }

Fixed operator/ ( int  x,
Fixed  y 
)

Definition at line 105 of file fixed.cpp.

00105                                   {
00106     return Fixed(x, 0) / y;
00107 }

Fixed operator/ ( Fixed  x,
int  y 
)

Definition at line 100 of file fixed.cpp.

00100                                   {
00101     return x / Fixed(y, 0);
00102 }

Fixed operator/ ( Fixed  x,
Fixed  y 
)

Definition at line 93 of file fixed.cpp.

References Fixed::precision, and Fixed::value.

00093                                     {
00094     x.value = x.value / y.value;
00095     x.precision += y.precision;
00096     return x;
00097 }

bool operator< ( int  x,
Fixed  y 
)

Definition at line 271 of file fixed.cpp.

00271                                  {
00272     return Fixed(x, 0) < y;
00273 }

bool operator< ( Fixed  x,
int  y 
)

Definition at line 266 of file fixed.cpp.

00266                                  {
00267     return x < Fixed(y, 0);
00268 }

bool operator< ( Fixed  x,
Fixed  y 
)

Definition at line 260 of file fixed.cpp.

References Fixed::equalize_precision(), and Fixed::value.

00260                                    {
00261     x.equalize_precision(y);
00262     return x.value < y.value;
00263 }

bool operator== ( int  x,
Fixed  y 
)

Definition at line 174 of file fixed.cpp.

00174                                   {
00175     return Fixed(x, 0) == y;
00176 }

bool operator== ( Fixed  x,
int  y 
)

Definition at line 168 of file fixed.cpp.

00168                                   {
00169     return x == Fixed(y, 0);
00170 }

bool operator== ( Fixed  x,
Fixed  y 
)

Definition at line 162 of file fixed.cpp.

References Fixed::equalize_precision(), and Fixed::value.

00162                                     {
00163     x.equalize_precision(y);
00164     return x.value == y.value;
00165 }


Generated on Sat Dec 15 00:01:36 2007 for BulmaGes by  doxygen 1.5.1