Fix ArcTan2

This commit is contained in:
Jeffrey Pfau 2013-09-27 09:47:30 -07:00
parent f8341f2d20
commit 453fdac3fe
1 changed files with 1 additions and 1 deletions

View File

@ -203,7 +203,7 @@ void GBASwi16(struct ARMBoard* board, int immediate) {
gba->cpu.gprs[0] = sqrt(gba->cpu.gprs[0]); gba->cpu.gprs[0] = sqrt(gba->cpu.gprs[0]);
break; break;
case 0xA: 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; break;
case 0xB: case 0xB:
_CpuSet(gba); _CpuSet(gba);