//
// GJScaleControl::valueFromScale from 0x6ebbac to 0x6ebbf2 (70 bytes)
//
// 9 xrefs:
// > GJScaleControl::ccTouchMoved @ 0x6ee310
// > GJScaleControl::ccTouchMoved @ 0x6ee4d2
// > GJScaleControl::ccTouchMoved @ 0x6ee4e8
// > GJScaleControl::onApplyScale @ 0x6ee684
// > GJScaleControl::onApplyScale @ 0x6ee69a
// > GJScaleControl::onApplyScale @ 0x6ee6b0
// > GJScaleControl::loadValues @ 0x6eeba8
// > GJScaleControl::loadValues @ 0x6eebbe
// > GJScaleControl::loadValues @ 0x6eebe4
//
// 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:57:32 +0000
//
int __fastcall GJScaleControl::valueFromScale(GJScaleControl *this, float a2)
{
float v2; // s15
v2 = (float)(a2 - *((float *)this + 105)) / (float)(*((float *)this + 104) - *((float *)this + 105));
if ( v2 >= 1.0 )
{
v2 = 1.0;
}
else if ( v2 <= 0.0 )
{
v2 = 0.0;
}
return LODWORD(v2);
}