mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 05:29:43 +00:00
ppcfpopcodes: Fix fctiw* round to nearest.
0.3 should not round up to 1.
This commit is contained in:
parent
a7e6ab33a1
commit
dac9c1e52c
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user