//
// GJBaseGameLayer::performMathRounding from 0x595858 to 0x595878 (32 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x5959a6
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x5959f6
// > GJBaseGameLayer::activateItemEditTrigger @ 0x5bd2cc
// > GJBaseGameLayer::activateItemEditTrigger @ 0x5bd30a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:53:08 +0000
//
float __fastcall GJBaseGameLayer::performMathRounding(GJBaseGameLayer *this, double x, int a3)
{
double v4; // r0
v4 = x;
switch ( a3 )
{
case 2:
v4 = j_floor(x);
break;
case 3:
v4 = j_ceil(x);
break;
case 1:
LODWORD(v4) = j_round();
break;
}
return *(float *)&v4;
}