Skip to content

Commit 429bf83

Browse files
authored
Fixing casting issue in fixed-point.hh
The `integer()` overload with a different type had inconsistent codepath between signed and unsigned, resulting in precision problems.
1 parent a067701 commit 429bf83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mips/psyqo/fixed-point.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class FixedPoint {
172172
return U((value - scale / 2) / scale);
173173
}
174174
}
175-
return U(value + scale / 2) / U(scale);
175+
return U((value + scale / 2) / scale);
176176
}
177177

178178
/**

0 commit comments

Comments
 (0)