all repos — mgba @ 738b3dc44e1d8f7eb3179b0b07c85bae7dc4123b

mGBA Game Boy Advance Emulator

Implement ArcTan2
Jeffrey Pfau jeffrey@endrift.com
Sat, 04 May 2013 15:50:42 -0700
commit

738b3dc44e1d8f7eb3179b0b07c85bae7dc4123b

parent

374aca2ff7c9481951cb615e2931b7dc988042ed

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

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

@@ -201,6 +201,9 @@ break;

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; + break; case 0xB: _CpuSet(gba); break;