//
// EditorUI::getSnapAngle from 0x10004a800 to 0x10004a8a8 (168 bytes)
//
// 2 xrefs:
// > EditorUI::transformObjectCall_1 @ 0x10004aa62
// > EditorUI::transformObjectCall_1 @ 0x10004aab4
//
// 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 __fastcall EditorUI::getSnapAngle(EditorUI *a1, GameObject *a2, cocos2d::CCArray *a3)
{
unsigned int v4; // r15d
GameObject *v5; // rax
float result; // xmm0_4
if ( !a3 || !(unsigned int)sub_100720070(a3) )
{
if ( a2 )
return LevelEditorLayer::rotationForSlopeNearObject(a1->m_editorLayer, a2);
return -1.0;
}
if ( !(unsigned int)sub_100720070(a3) )
return -1.0;
v4 = 0;
while ( 1 )
{
v5 = (GameObject *)sub_1007200C0(a3, v4);
result = LevelEditorLayer::rotationForSlopeNearObject(a1->m_editorLayer, v5);
if ( result != -1.0 )
break;
if ( ++v4 >= (unsigned int)sub_100720070(a3) )
return -1.0;
}
return result;
}