Implement ArcTan2
Jeffrey Pfau jeffrey@endrift.com
Sat, 04 May 2013 15:50:42 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-bios.c
→
src/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;