git-svn-id: svn://db.shs.com.ru/pip@532 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-08-03 20:29:50 +00:00
parent cfc29ecb08
commit b60e146f86
5 changed files with 12 additions and 6 deletions

View File

@@ -31,8 +31,8 @@ public:
typedef PIFixedPoint<Precision, Type> fp;
PIFixedPoint(const Type &v = Type()) {val = fpv(v);}
PIFixedPoint(const fp &v) {val = v.val;}
PIFixedPoint(const float &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << Precision-1));}
PIFixedPoint(const double &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << Precision-1));}
PIFixedPoint(const float &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << (Precision-1)));}
PIFixedPoint(const double &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << (Precision-1)));}
// FixedPoint(const long double &v) {val = Precision == 0 ? Type(v) : Type(v * (2 << Precision-1));}
template<typename T>