|
|
|
@ -135,9 +135,9 @@ constexpr SFixed<Integer, Fraction> roundFixed(const SFixed<Integer, Fraction> & |
|
|
|
|
{ |
|
|
|
|
using OutputType = SFixed<Integer, Fraction>; |
|
|
|
|
return
|
|
|
|
|
signbitFixed(value) |
|
|
|
|
? (value.getFraction() <= OutputType(0.5).getFraction()) ? floorFixed(value) : ceilFixed(value) |
|
|
|
|
: (value.getFraction() >= OutputType(0.5).getFraction()) ? ceilFixed(value) : floorFixed(value); |
|
|
|
|
signbitFixed(value) ? |
|
|
|
|
((value.getFraction() <= OutputType(0.5).getFraction()) ? floorFixed(value) : ceilFixed(value)) : |
|
|
|
|
((value.getFraction() >= OutputType(0.5).getFraction()) ? ceilFixed(value) : floorFixed(value)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
template< unsigned Integer, unsigned Fraction > |
|
|
|
|