Fix accidental deletion

add-0-integer-specialisation
Pharap 7 years ago
parent 8cc3094f7b
commit d11aaecd60
  1. 2
      src/FixedPoints/Utils.h

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

Loading…
Cancel
Save