Lines Matching defs:int
24 template <typename T, unsigned int precision>
33 FixedPoint(int value) : v(static_cast<T>(value)<<precision) {}
34 FixedPoint(unsigned int value) : v(static_cast<T>(value)<<precision) {}
40 const unsigned int half_size = 8*sizeof(T)/2;
43 v = static_cast<unsigned int>(al*bl)>>precision;
57 FixedPoint& operator*=(int val) { v *= val; return *this; }
58 FixedPoint& operator*=(unsigned int val) { v *= val; return *this; }
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; }
78 operator int() const { return v>>precision; }
79 operator unsigned int() const { return 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; }