mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-22 13:54:28 +01:00
VFPU: fix rounding in VF2IN
This commit is contained in:
1 parent
d8294f025f
commit
76e16d49f6
4 files changed
+10
-28
No files matched your search
@@ -51,25 +51,6 @@
|
||||
#define LO currentMIPS->lo
|
||||
|
||||
|
||||
inline int is_even(float d) {
|
||||
float int_part;
|
||||
modff(d / 2.0f, &int_part);
|
||||
return 2.0f * int_part == d;
|
||||
}
|
||||
|
||||
// Rounds *.5 to closest even number
|
||||
float round_ieee_754(float d) {
|
||||
float i = floorf(d);
|
||||
d -= i;
|
||||
if(d < 0.5f)
|
||||
return i;
|
||||
if(d > 0.5f)
|
||||
return i + 1.0f;
|
||||
if(is_even(i))
|
||||
return i;
|
||||
return i + 1.0f;
|
||||
}
|
||||
|
||||
static inline void DelayBranchTo(u32 where)
|
||||
{
|
||||
PC += 4;
|
||||
|
||||
Reference in new issue
Block a user