//
// EditorUI::getSnapAngle from 0x10060f080 to 0x10060f128 (168 bytes)
//
// 2 xrefs:
// > EditorUI::transformObjectCall_1 @ 0x10060ee6d
// > EditorUI::transformObjectCall_1 @ 0x10060eea8
//
// This function is hookable on this platform (idp: pc, 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 12:34:34 +0000
//
float __fastcall EditorUI::getSnapAngle(__int64 a1, __int64 a2, __int64 a3)
{
unsigned int v4; // r15d
__int64 v5; // rax
float result; // xmm0_4
if ( !a3 || !(unsigned int)sub_1007FEF90(a3) )
{
if ( a2 )
return LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1440), a2);
return -1.0;
}
if ( !(unsigned int)sub_1007FEF90(a3) )
return -1.0;
v4 = 0;
while ( 1 )
{
v5 = sub_1007FEFE0(a3, v4);
result = LevelEditorLayer::rotationForSlopeNearObject(*(_QWORD *)(a1 + 1440), v5);
if ( result != -1.0 )
break;
if ( ++v4 >= (unsigned int)sub_1007FEF90(a3) )
return -1.0;
}
return result;
}