//
// cocos2d::ccpClamp from 0x180093d20 to 0x180093d8d (109 bytes)
//
// 3 xrefs:
// > cocos2d::CCProgressTimer::setMidpoint @ 0x18005e017
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6624
//
// 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 *__fastcall cocos2d::ccpClamp(
cocos2d *this,
const struct cocos2d::CCPoint *a2,
const struct cocos2d::CCPoint *a3,
const struct cocos2d::CCPoint *a4)
{
float y; // xmm2_4
float v6; // xmm3_4
float v7; // xmm1_4
float x; // xmm4_4
float v9; // xmm1_4
float v10; // xmm2_4
y = a4->y;
v6 = a3->y;
v7 = a2->y;
if ( v6 > y )
{
v6 = a4->y;
y = a3->y;
}
if ( v6 <= v7 )
v6 = fminf(v7, y);
x = a4->x;
v9 = a3->x;
v10 = a2->x;
if ( a3->x > a4->x )
{
v9 = a4->x;
x = a3->x;
}
if ( v9 <= v10 )
v9 = fminf(v10, x);
kmVec2Fill((float *)this, v9, v6);
return this;
}