//
// truncFloat2ToStr from 0x589640 to 0x5896d0 (144 bytes)
//
// 2 xrefs:
// > GJRotateCommandLayer::updateDegreesLabel @ 0x92608c
// > ??> @ 0x94638
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __usercall truncFloat2ToStr@(float a1@, __int64 a2@)
{
const char *v2; // x1
cocos2d::CCString *v4; // x0
char *CString; // x0
v2 = (const char *)(unsigned int)(int)a1;
if ( (float)(a1 - (float)(int)v2) == 0.0 )
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v2);
else
v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%0.2f", v2, a1);
CString = (char *)cocos2d::CCString::getCString(v4);
sub_D153B8(a2, CString);
return a2;
}