PhysicsJointLimit* PhysicsJointLimit::construct(PhysicsBody* a, PhysicsBody* b, const Vec2& anchr1, const Vec2& anchr2, float min, float max)
{
    PhysicsJointLimit* joint = new (std::nothrow) PhysicsJointLimit();
    
    if (joint && joint->init(a, b, anchr1, anchr2, min, max))
    {
        return joint;
    }
    
    CC_SAFE_DELETE(joint);
    return nullptr;
}
PhysicsJointLimit* PhysicsJointLimit::construct(PhysicsBody* a, PhysicsBody* b, const Point& anchr1, const Point& anchr2)
{
    PhysicsJointLimit* joint = new PhysicsJointLimit();
    
    if (joint && joint->init(a, b, anchr1, anchr2))
    {
        return joint;
    }
    
    CC_SAFE_DELETE(joint);
    return nullptr;
}