X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_fixed.h;h=541f40c79ec9fe21e4d17b0a2bdaf4009518095f;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=78ed0cdba8e674e29f7796d5049ba5e16df56ae6;hpb=8d078f7fbf638f6d847eb67bcea2511287361e40;p=synfig.git diff --git a/ETL/trunk/ETL/_fixed.h b/ETL/trunk/ETL/_fixed.h index 78ed0cd..541f40c 100644 --- a/ETL/trunk/ETL/_fixed.h +++ b/ETL/trunk/ETL/_fixed.h @@ -4,6 +4,7 @@ ** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -258,7 +259,7 @@ fixed_base::data()const //! fixed+=fixed template const fixed_base & -fixed_base::operator+=(const fixed_base &rhs) +fixed_base::operator+=(const _fixed &rhs) { _data+=rhs._data; return *this; @@ -266,7 +267,7 @@ fixed_base::operator+=(const fixed_base &rhs) //! fixed-=fixed template const fixed_base & -fixed_base::operator-=(const fixed_base &rhs) +fixed_base::operator-=(const _fixed &rhs) { _data-=rhs._data; return *this; @@ -274,7 +275,7 @@ fixed_base::operator-=(const fixed_base &rhs) //! fixed*=fixed template const fixed_base & -fixed_base::operator*=(const fixed_base &rhs) +fixed_base::operator*=(const _fixed &rhs) { if(_TYPE_SMALLER_THAN_INT()) _data=static_cast((int)_data*(int)rhs._data>>FIXED_BITS); @@ -289,7 +290,7 @@ fixed_base::operator*=(const fixed_base &rhs) //! fixed/=fixed template const fixed_base & -fixed_base::operator/=(const fixed_base &rhs) +fixed_base::operator/=(const _fixed &rhs) { if(_TYPE_SMALLER_THAN_INT()) _data=static_cast((int)_data/(int)rhs._data<::operator/=(const int &rhs) //! fixed + fixed template fixed_base -fixed_base::operator+(const fixed_base &rhs)const +fixed_base::operator+(const _fixed &rhs)const { _fixed ret; ret._data=_data+rhs._data; @@ -344,7 +345,7 @@ fixed_base::operator+(const fixed_base &rhs)const //! fixed - fixed template fixed_base -fixed_base::operator-(const fixed_base &rhs)const +fixed_base::operator-(const _fixed &rhs)const { _fixed ret; ret._data=_data-rhs._data; @@ -353,7 +354,7 @@ fixed_base::operator-(const fixed_base &rhs)const //! fixed * fixed template fixed_base -fixed_base::operator*(const fixed_base &rhs)const +fixed_base::operator*(const _fixed &rhs)const { _fixed ret; ret._data=((_data*rhs._data)>>FIXED_BITS); @@ -363,7 +364,7 @@ fixed_base::operator*(const fixed_base &rhs)const //! fixed / fixed template fixed_base -fixed_base::operator/(const fixed_base &rhs)const +fixed_base::operator/(const _fixed &rhs)const { _fixed ret; ret._data=((_data/rhs._data)<