Lines Matching defs:operator

37     FixedPoint& operator+=(FixedPoint val) { v += val.v; return *this; }
38 FixedPoint& operator-=(FixedPoint val) { v -= val.v; return *this; }
39 FixedPoint& operator*=(FixedPoint val) {
53 FixedPoint& operator*=(char val) { v *= val; return *this; }
54 FixedPoint& operator*=(unsigned char val) { v *= val; return *this; }
55 FixedPoint& operator*=(short val) { v *= val; return *this; }
56 FixedPoint& operator*=(unsigned short val) { v *= val; return *this; }
57 FixedPoint& operator*=(int val) { v *= val; return *this; }
58 FixedPoint& operator*=(unsigned int val) { v *= val; return *this; }
60 FixedPoint operator+(FixedPoint val) const { FixedPoint r(*this); return r+=val; }
61 FixedPoint operator-(FixedPoint val) const { FixedPoint r(*this); return r-=val; }
62 FixedPoint operator*(FixedPoint val) const { FixedPoint r(*this); return r*=val; }
64 FixedPoint operator*(char val) const { FixedPoint r(*this); return r*=val; }
65 FixedPoint operator*(unsigned char val) const { FixedPoint r(*this); return r*=val; }
66 FixedPoint operator*(short val) const { FixedPoint r(*this); return r*=val; }
67 FixedPoint operator*(unsigned short val) const { FixedPoint r(*this); return r*=val; }
68 FixedPoint operator*(int val) const { FixedPoint r(*this); return r*=val; }
69 FixedPoint operator*(unsigned int val) const { FixedPoint r(*this); return r*=val; }
71 float operator*(float val) const { return static_cast<float>(*this)*val; }
72 double operator*(double val) const { return static_cast<double>(*this)*val; }
74 operator char() const { return v>>precision; }
75 operator unsigned char() const { return v>>precision; }
76 operator short() const { return v>>precision; }
77 operator unsigned short() const { return v>>precision; }
78 operator int() const { return v>>precision; }
79 operator unsigned int() const { return v>>precision; }
81 operator float() const { return ldexpf(v,-precision); }
82 operator double() const { return ldexp(v,-precision); }
87 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(char a, FixedPoint<T,precision> b) { return b*=a; }
88 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(unsigned char a, FixedPoint<T,precision> b) { return b*=a; }
89 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(short a, FixedPoint<T,precision> b) { return b*=a; }
90 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(unsigned short a, FixedPoint<T,precision> b) { return b*=a; }
91 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(int a, FixedPoint<T,precision> b) { return b*=a; }
92 template<typename T, unsigned int precision> FixedPoint<T,precision> operator *(unsigned int a, FixedPoint<T,precision> b) { return b*=a; }
94 template<typename T, unsigned int precision> float operator *(float a, FixedPoint<T,precision> b) { return b*a; }
95 template<typename T, unsigned int precision> double operator *(double a, FixedPoint<T,precision> b) { return b*a; }