//
// EditorUI::valueFromXPos from 0x100474ecc to 0x100474f5c (144 bytes)
//
// 1 xrefs:
// > EditorUI::updateSlider @ 0x100471ba8
//
// 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 11:05:40 +0000
//
float __fastcall EditorUI::valueFromXPos(__int64 a1, float a2)
{
float XMin; // s9
int SectionCount; // w0
unsigned int v6; // w8
XMin = EditorUI::getXMin(a1, 0);
SectionCount = LevelEditorLayer::getSectionCount(*(_QWORD *)(a1 + 1440));
if ( SectionCount <= 100 )
v6 = 100;
else
v6 = SectionCount;
return fminf(
fmaxf(
(float)(a2 - XMin)
/ (float)((float)((float)v6 * -100.0)
* (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL))),
0.0),
1.0);
}