//
// GJBaseGameLayer::performMathOperation from 0x9a7df0 to 0x9a7e54 (100 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x9a7fa0
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x9a8098
// > GJBaseGameLayer::activateItemEditTrigger @ 0x9ecc9c
// > GJBaseGameLayer::activateItemEditTrigger @ 0x9ecd20
// > GJBaseGameLayer::activateItemEditTrigger @ 0x9ecde0
// > ??> @ 0x4af08
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:58:10 +0000
//
double __fastcall GJBaseGameLayer::performMathOperation(GJBaseGameLayer *this, double a2, double a3, int a4)
{
double v4; // d2
double result; // d0
v4 = 0.0;
switch ( a4 )
{
case 1:
return a2 + a3;
case 2:
v4 = a2 - a3;
goto LABEL_3;
case 3:
return a2 * a3;
case 4:
v4 = 0.0;
if ( a3 == 0.0 )
goto LABEL_3;
result = a2 / a3;
break;
default:
LABEL_3:
result = v4;
break;
}
return result;
}