//
// cocos2d::ccpAngle from 0x180093bf0 to 0x180093d0b (283 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6618
//
// 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 cocos2d::ccpAngle(cocos2d *this, struct cocos2d::CCPoint *a2, const struct cocos2d::CCPoint *a3)
{
float v5; // xmm1_4
float v6; // xmm0_4
float v7; // xmm1_4
float v8; // xmm0_4
float result; // xmm0_4
float v10; // [rsp+40h] [rbp+8h] BYREF
float v11; // [rsp+44h] [rbp+Ch]
float v12; // [rsp+48h] [rbp+10h] BYREF
float v13; // [rsp+4Ch] [rbp+14h]
v5 = (float)(a2->x * a2->x) + (float)(a2->y * a2->y);
if ( v5 < 0.0 )
v6 = sqrtf(v5);
else
v6 = fsqrt(v5);
if ( v6 == 0.0 )
kmVec2Fill(&v10, 1.0, 0.0);
else
cocos2d::CCSize::operator/((float *)a2, &v10, v6);
v7 = (float)(*(float *)this * *(float *)this) + (float)(*((float *)this + 1) * *((float *)this + 1));
if ( v7 < 0.0 )
v8 = sqrtf(v7);
else
v8 = fsqrt(v7);
if ( v8 == 0.0 )
kmVec2Fill(&v12, 1.0, 0.0);
else
cocos2d::CCSize::operator/((float *)this, &v12, v8);
result = acosf((float)(v12 * v10) + (float)(v11 * v13));
if ( fabs(result) < 0.00000011920929 )
return 0.0;
return result;
}