Implement ArcTan2

This commit is contained in:
Jeffrey Pfau 2013-05-04 15:50:42 -07:00
parent 374aca2ff7
commit 738b3dc44e
1 changed files with 3 additions and 0 deletions

View File

@ -201,6 +201,9 @@ void GBASwi16(struct ARMBoard* board, int immediate) {
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;