ppcfpopcodes: Fix fctiw* round to nearest.

0.3 should not round up to 1.
This commit is contained in:
joevt 2024-02-05 06:12:48 -08:00 committed by dingusdev
parent a7e6ab33a1
commit dac9c1e52c
1 changed files with 1 additions and 5 deletions

View File

@ -123,11 +123,7 @@ inline void ppc_update_cr1() {
}
int32_t round_to_nearest(double f) {
if (f >= 0.0) {
return static_cast<int32_t>(static_cast<int64_t> (std::ceil(f)));
} else {
return static_cast<int32_t>(static_cast<int64_t> (std::floor(f)));
}
return static_cast<int32_t>(static_cast<int64_t> (std::floor(f + 0.5)));
}
void set_host_rounding_mode(uint8_t mode) {