//
// GJScaleControl::valueFromScale from 0x386d50 to 0x386d96 (70 bytes)
//
// 6 xrefs:
// > GJScaleControl::ccTouchMoved @ 0x386f5e
// > GJScaleControl::ccTouchMoved @ 0x387120
// > GJScaleControl::ccTouchMoved @ 0x387136
// > GJScaleControl::loadValues @ 0x3a0214
// > GJScaleControl::loadValues @ 0x3a022a
// > GJScaleControl::loadValues @ 0x3a0250
//
// 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
//
float GJScaleControl::valueFromScale(GJScaleControl *a1, float a2)
{
float v2; // s15
v2 = (float)(a2 - a1->m_lowerBound) / (float)(a1->m_upperBound - a1->m_lowerBound);
if ( v2 >= 1.0 )
return 1.0;
if ( v2 <= 0.0 )
return 0.0;
return v2;
}