VFPU: fix rounding in VF2IN

This commit is contained in:
Henrik Rydgard committed 2013-07-30 01:09:11 +02:00
1 parent d8294f025f
commit 76e16d49f6
4 files changed
+10 -28

No files matched your search

-19
View File
@@ -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;