|
|
|
@ -28,6 +28,26 @@ constexpr SFixed<Integer * 2, Fraction * 2> multiply(const SFixed<Integer, Fract |
|
|
|
|
return ResultType::fromInternal(static_cast<InternalType>(static_cast<InternalType>(left.getInternal()) * static_cast<InternalType>(right.getInternal()))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Postincrement and Postdecrement
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|
SFixed<Integer, Fraction> operator ++(SFixed<Integer, Fraction> & value, int) |
|
|
|
|
{ |
|
|
|
|
const auto oldValue = value; |
|
|
|
|
++value; |
|
|
|
|
return oldValue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|
SFixed<Integer, Fraction> operator --(SFixed<Integer, Fraction> & value, int) |
|
|
|
|
{ |
|
|
|
|
const auto oldValue = value; |
|
|
|
|
--value; |
|
|
|
|
return oldValue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Basic Logic Operations
|
|
|
|
|
//
|
|
|
|
|