all repos — mgba @ 453fdac3fe7f33fdb978cadd519983d85f6ceaca

mGBA Game Boy Advance Emulator

Fix ArcTan2
Jeffrey Pfau jeffrey@endrift.com
Fri, 27 Sep 2013 09:47:30 -0700
commit

453fdac3fe7f33fdb978cadd519983d85f6ceaca

parent

f8341f2d205f12e53c643919ade3b269e6a4159b

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/gba-bios.csrc/gba/gba-bios.c

@@ -203,7 +203,7 @@ case 0x8:

gba->cpu.gprs[0] = sqrt(gba->cpu.gprs[0]); break; case 0xA: - gba->cpu.gprs[0] = (atan2f(gba->cpu.gprs[0] / 16384.f, gba->cpu.gprs[1] / 16384.f) / 2 * M_PI) * 0x10000; + gba->cpu.gprs[0] = atan2f(gba->cpu.gprs[1] / 16384.f, gba->cpu.gprs[0] / 16384.f) / (2 * M_PI) * 0x10000; break; case 0xB: _CpuSet(gba);