//
// cocos2d::ccpNormalize from 0xb1ef5c to 0xb1efdc (128 bytes)
//
// 17 xrefs:
// > GJBaseGameLayer::triggerMoveCommand @ 0x8750d8
// > GJBaseGameLayer::processDynamicObjectActions @ 0x879bac
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x8842d8
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x88441c
// > cocos2d::CCLens3D::update @ 0xabbb54
// > sub_AD91B8 @ 0xad9240
// > cocos2d::CCDrawNode::drawPolygon @ 0xada6d0
// > cocos2d::CCDrawNode::drawPolygon @ 0xada6f8
// > cocos2d::CCParticleSystem::update @ 0xafee38
// > cocos2d::CCParticleSystem::update @ 0xaff584
// > cocos2d::ccpAngle @ 0xb1f4c8
// > cocos2d::ccpAngle @ 0xb1f4d8
// > cocos2d::ccVertexLineToPolygon @ 0xb20b08
// > cocos2d::ccVertexLineToPolygon @ 0xb20bf8
// > cocos2d::ccVertexLineToPolygon @ 0xb20c14
// > cocos2d::ccVertexLineToPolygon @ 0xb20c60
// > ??> @ 0x5ed88
//
// 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
//
cocos2d::CCPoint cocos2d::ccpNormalize(const cocos2d::CCPoint *a1)
{
cocos2d::CCPoint *v1; // x8
float v2; // s0
cocos2d::CCPoint result; // 0:s0.4,4:s1.4
v2 = sqrtf((float)(a1->y * a1->y) + (float)(a1->x * a1->x));
if ( v2 == 0.0 )
cocos2d::CCPoint::CCPoint(v1, 1.0, 0.0);
else
cocos2d::CCPoint::operator/((float *)a1, v1, v2);
return result;
}