Utilities: Fix subtraction operation function in FixedInt class (#2313)

This commit is contained in:
Huud 2018-02-20 13:09:34 +03:00 committed by Akash
parent 41c49faa81
commit 4e3730f8f4

View File

@ -51,7 +51,7 @@ FixedInt<Precision> FixedInt<Precision>::operator+(const FixedInt<Precision> &ri
template <int Precision>
FixedInt<Precision> FixedInt<Precision>::operator-(const FixedInt<Precision> &right) const
{
return FixedInt<Precision>().SetRaw(Raw + right.Raw);
return FixedInt<Precision>().SetRaw(Raw - right.Raw);
}
template <int Precision>
@ -63,7 +63,7 @@ FixedInt<Precision> &FixedInt<Precision>::operator+=(const FixedInt<Precision> &
template <int Precision>
FixedInt<Precision> &FixedInt<Precision>::operator-=(const FixedInt<Precision> &right)
{
return SetRaw(Raw + right.Raw);
return SetRaw(Raw - right.Raw);
}
template <int Precision>