|
|
|
@ -71,7 +71,7 @@ constexpr SFixed<Integer, Fraction>::operator IntegerType(void) const |
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|
constexpr SFixed<Integer, Fraction>::operator float(void) const |
|
|
|
|
{ |
|
|
|
|
return (1.0f / Scale) * |
|
|
|
|
return (1.0F / Scale) * |
|
|
|
|
static_cast<InternalType> |
|
|
|
|
((this->value & IdentityMask) | |
|
|
|
|
((this->value < 0) ? ~IdentityMask : 0)); |
|
|
|
@ -86,6 +86,15 @@ constexpr SFixed<Integer, Fraction>::operator double(void) const |
|
|
|
|
((this->value < 0) ? ~IdentityMask : 0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|
constexpr SFixed<Integer, Fraction>::operator long double(void) const |
|
|
|
|
{ |
|
|
|
|
return (1.0L / Scale) * |
|
|
|
|
static_cast<InternalType> |
|
|
|
|
((this->value & IdentityMask) | |
|
|
|
|
((this->value < 0) ? ~IdentityMask : 0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|
template< unsigned IntegerOut, unsigned FractionOut > |
|
|
|
|
constexpr SFixed<Integer, Fraction>::operator SFixed<IntegerOut, FractionOut>(void) const |
|
|
|
|