/**
 *
 * @param {AABB2} box
 * @param {number} targetX target point X coordinate
 * @param {number} targetY target point Y coordinate
 * @param {number} strength
 */
export function pullBoxTowardsPoint(
    box,
    targetX, targetY,
    strength
) {

    const midX = box.centerX;
    const midY = box.centerY;

    const deltaX = targetX - midX;
    const deltaY = targetY - midY;

    //multiply by strength
    const displacementX = deltaX * strength;
    const displacementY = deltaY * strength;

    box.move(displacementX, displacementY);
}
