"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "goo/FixedPoint.h" between
xpdf-4.02.tar.gz and xpdf-4.03.tar.gz

About: Xpdf is a PDF viewer for X.

FixedPoint.h  (xpdf-4.02):FixedPoint.h  (xpdf-4.03)
skipping to change at line 39 skipping to change at line 39
typedef long long FixPtInt64; typedef long long FixPtInt64;
class FixedPoint { class FixedPoint {
public: public:
FixedPoint() { val = 0; } FixedPoint() { val = 0; }
FixedPoint(const FixedPoint &x) { val = x.val; } FixedPoint(const FixedPoint &x) { val = x.val; }
FixedPoint(double x) { val = (int)(x * (1 << fixptShift) + 0.5); } FixedPoint(double x) { val = (int)(x * (1 << fixptShift) + 0.5); }
FixedPoint(int x) { val = x << fixptShift; } FixedPoint(int x) { val = x << fixptShift; }
FixedPoint(Guint x) { val = x << fixptShift; }
FixedPoint(long x) { val = (int)x << fixptShift; } FixedPoint(long x) { val = (int)x << fixptShift; }
operator float() operator float()
{ return (float) val * ((float)1 / (float)(1 << fixptShift)); } { return (float) val * ((float)1 / (float)(1 << fixptShift)); }
operator double() operator double()
{ return (double) val * (1.0 / (double)(1 << fixptShift)); } { return (double) val * (1.0 / (double)(1 << fixptShift)); }
operator int() operator int()
{ return val >> fixptShift; } { return val >> fixptShift; }
int get16Dot16() { return val; } int get16Dot16() { return val; }
FixedPoint operator =(FixedPoint x) { val = x.val; return *this; } FixedPoint operator =(FixedPoint x) { val = x.val; return *this; }
bool operator ==(FixedPoint x) const { return val == x.val; } bool operator ==(FixedPoint x) const { return val == x.val; }
bool operator ==(double x) const { return *this == (FixedPoint)x; } bool operator ==(double x) const { return *this == (FixedPoint)x; }
bool operator ==(int x) const { return *this == (FixedPoint)x; } bool operator ==(int x) const { return *this == (FixedPoint)x; }
bool operator ==(Guint x) const { return *this == (FixedPoint)x; }
bool operator ==(long x) const { return *this == (FixedPoint)x; } bool operator ==(long x) const { return *this == (FixedPoint)x; }
bool operator !=(FixedPoint x) const { return val != x.val; } bool operator !=(FixedPoint x) const { return val != x.val; }
bool operator !=(double x) const { return *this != (FixedPoint)x; } bool operator !=(double x) const { return *this != (FixedPoint)x; }
bool operator !=(int x) const { return *this != (FixedPoint)x; } bool operator !=(int x) const { return *this != (FixedPoint)x; }
bool operator !=(Guint x) const { return *this != (FixedPoint)x; }
bool operator !=(long x) const { return *this != (FixedPoint)x; } bool operator !=(long x) const { return *this != (FixedPoint)x; }
bool operator <(FixedPoint x) const { return val < x.val; } bool operator <(FixedPoint x) const { return val < x.val; }
bool operator <(double x) const { return *this < (FixedPoint)x; } bool operator <(double x) const { return *this < (FixedPoint)x; }
bool operator <(int x) const { return *this < (FixedPoint)x; } bool operator <(int x) const { return *this < (FixedPoint)x; }
bool operator <(Guint x) const { return *this < (FixedPoint)x; }
bool operator <(long x) const { return *this < (FixedPoint)x; } bool operator <(long x) const { return *this < (FixedPoint)x; }
bool operator <=(FixedPoint x) const { return val <= x.val; } bool operator <=(FixedPoint x) const { return val <= x.val; }
bool operator <=(double x) const { return *this <= (FixedPoint)x; } bool operator <=(double x) const { return *this <= (FixedPoint)x; }
bool operator <=(int x) const { return *this <= (FixedPoint)x; } bool operator <=(int x) const { return *this <= (FixedPoint)x; }
bool operator <=(Guint x) const { return *this <= (FixedPoint)x; }
bool operator <=(long x) const { return *this <= (FixedPoint)x; } bool operator <=(long x) const { return *this <= (FixedPoint)x; }
bool operator >(FixedPoint x) const { return val > x.val; } bool operator >(FixedPoint x) const { return val > x.val; }
bool operator >(double x) const { return *this > (FixedPoint)x; } bool operator >(double x) const { return *this > (FixedPoint)x; }
bool operator >(int x) const { return *this > (FixedPoint)x; } bool operator >(int x) const { return *this > (FixedPoint)x; }
bool operator >(Guint x) const { return *this > (FixedPoint)x; }
bool operator >(long x) const { return *this > (FixedPoint)x; } bool operator >(long x) const { return *this > (FixedPoint)x; }
bool operator >=(FixedPoint x) const { return val >= x.val; } bool operator >=(FixedPoint x) const { return val >= x.val; }
bool operator >=(double x) const { return *this >= (FixedPoint)x; } bool operator >=(double x) const { return *this >= (FixedPoint)x; }
bool operator >=(int x) const { return *this >= (FixedPoint)x; } bool operator >=(int x) const { return *this >= (FixedPoint)x; }
bool operator >=(Guint x) const { return *this >= (FixedPoint)x; }
bool operator >=(long x) const { return *this >= (FixedPoint)x; } bool operator >=(long x) const { return *this >= (FixedPoint)x; }
FixedPoint operator -() { return make(-val); } FixedPoint operator -() { return make(-val); }
FixedPoint operator +(FixedPoint x) { return make(val + x.val); } FixedPoint operator +(FixedPoint x) { return make(val + x.val); }
FixedPoint operator +(double x) { return *this + (FixedPoint)x; } FixedPoint operator +(double x) { return *this + (FixedPoint)x; }
FixedPoint operator +(int x) { return *this + (FixedPoint)x; } FixedPoint operator +(int x) { return *this + (FixedPoint)x; }
FixedPoint operator +(Guint x) { return *this + (FixedPoint)x; }
FixedPoint operator +(long x) { return *this + (FixedPoint)x; } FixedPoint operator +(long x) { return *this + (FixedPoint)x; }
FixedPoint operator +=(FixedPoint x) { val = val + x.val; return *this; } FixedPoint operator +=(FixedPoint x) { val = val + x.val; return *this; }
FixedPoint operator +=(double x) { return *this += (FixedPoint)x; } FixedPoint operator +=(double x) { return *this += (FixedPoint)x; }
FixedPoint operator +=(int x) { return *this += (FixedPoint)x; } FixedPoint operator +=(int x) { return *this += (FixedPoint)x; }
FixedPoint operator +=(Guint x) { return *this += (FixedPoint)x; }
FixedPoint operator +=(long x) { return *this += (FixedPoint)x; } FixedPoint operator +=(long x) { return *this += (FixedPoint)x; }
FixedPoint operator -(FixedPoint x) { return make(val - x.val); } FixedPoint operator -(FixedPoint x) { return make(val - x.val); }
FixedPoint operator -(double x) { return *this - (FixedPoint)x; } FixedPoint operator -(double x) { return *this - (FixedPoint)x; }
FixedPoint operator -(int x) { return *this - (FixedPoint)x; } FixedPoint operator -(int x) { return *this - (FixedPoint)x; }
FixedPoint operator -(Guint x) { return *this - (FixedPoint)x; }
FixedPoint operator -(long x) { return *this - (FixedPoint)x; } FixedPoint operator -(long x) { return *this - (FixedPoint)x; }
FixedPoint operator -=(FixedPoint x) { val = val - x.val; return *this; } FixedPoint operator -=(FixedPoint x) { val = val - x.val; return *this; }
FixedPoint operator -=(double x) { return *this -= (FixedPoint)x; } FixedPoint operator -=(double x) { return *this -= (FixedPoint)x; }
FixedPoint operator -=(int x) { return *this -= (FixedPoint)x; } FixedPoint operator -=(int x) { return *this -= (FixedPoint)x; }
FixedPoint operator -=(Guint x) { return *this -= (FixedPoint)x; }
FixedPoint operator -=(long x) { return *this -= (FixedPoint)x; } FixedPoint operator -=(long x) { return *this -= (FixedPoint)x; }
FixedPoint operator *(FixedPoint x) { return make(mul(val, x.val)); } FixedPoint operator *(FixedPoint x) { return make(mul(val, x.val)); }
FixedPoint operator *(double x) { return *this * (FixedPoint)x; } FixedPoint operator *(double x) { return *this * (FixedPoint)x; }
FixedPoint operator *(int x) { return *this * (FixedPoint)x; } FixedPoint operator *(int x) { return *this * (FixedPoint)x; }
FixedPoint operator *(Guint x) { return *this * (FixedPoint)x; }
FixedPoint operator *(long x) { return *this * (FixedPoint)x; } FixedPoint operator *(long x) { return *this * (FixedPoint)x; }
FixedPoint operator *=(FixedPoint x) { val = mul(val, x.val); return *this; } FixedPoint operator *=(FixedPoint x) { val = mul(val, x.val); return *this; }
FixedPoint operator *=(double x) { return *this *= (FixedPoint)x; } FixedPoint operator *=(double x) { return *this *= (FixedPoint)x; }
FixedPoint operator *=(int x) { return *this *= (FixedPoint)x; } FixedPoint operator *=(int x) { return *this *= (FixedPoint)x; }
FixedPoint operator *=(Guint x) { return *this *= (FixedPoint)x; }
FixedPoint operator *=(long x) { return *this *= (FixedPoint)x; } FixedPoint operator *=(long x) { return *this *= (FixedPoint)x; }
FixedPoint operator /(FixedPoint x) { return make(div(val, x.val)); } FixedPoint operator /(FixedPoint x) { return make(div(val, x.val)); }
FixedPoint operator /(double x) { return *this / (FixedPoint)x; } FixedPoint operator /(double x) { return *this / (FixedPoint)x; }
FixedPoint operator /(int x) { return *this / (FixedPoint)x; } FixedPoint operator /(int x) { return *this / (FixedPoint)x; }
FixedPoint operator /(Guint x) { return *this / (FixedPoint)x; }
FixedPoint operator /(long x) { return *this / (FixedPoint)x; } FixedPoint operator /(long x) { return *this / (FixedPoint)x; }
FixedPoint operator /=(FixedPoint x) { val = div(val, x.val); return *this; } FixedPoint operator /=(FixedPoint x) { val = div(val, x.val); return *this; }
FixedPoint operator /=(double x) { return *this /= (FixedPoint)x; } FixedPoint operator /=(double x) { return *this /= (FixedPoint)x; }
FixedPoint operator /=(int x) { return *this /= (FixedPoint)x; } FixedPoint operator /=(int x) { return *this /= (FixedPoint)x; }
FixedPoint operator /=(Guint x) { return *this /= (FixedPoint)x; }
FixedPoint operator /=(long x) { return *this /= (FixedPoint)x; } FixedPoint operator /=(long x) { return *this /= (FixedPoint)x; }
static FixedPoint abs(FixedPoint x) { return make(::abs(x.val)); } static FixedPoint abs(FixedPoint x) { return make(::abs(x.val)); }
static int floor(FixedPoint x) { return x.val >> fixptShift; } static int floor(FixedPoint x) { return x.val >> fixptShift; }
static int ceil(FixedPoint x) static int ceil(FixedPoint x)
{ return (x.val & fixptMaskL) ? ((x.val >> fixptShift) + 1) { return (x.val & fixptMaskL) ? ((x.val >> fixptShift) + 1)
: (x.val >> fixptShift); } : (x.val >> fixptShift); }
 End of changes. 15 change blocks. 
0 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)