mirror of https://github.com/mgba-emu/mgba.git
Fix ArcTan2
This commit is contained in:
parent
f8341f2d20
commit
453fdac3fe
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue