Storms Id_1 and Id_2 merge if they partially overlap: Distance_of_centers^2 ≤ Radius_1^2 + Radius_2^2.

New_X =
    Trunc((X_1 * Voltage_1 + X_2 * Voltage_2) / (Voltage_1 + Voltage_2))
New_Y =
    Trunc((Y_1 * Voltage_1 + Y_2 * Voltage_2) / (Voltage_1 + Voltage_2))
    ...i.e. weighed average; closer to center of stronger storm
New_Radius =
    Trunc(Sqrt(Radius_1^2 + Radius_2^2))
    ...i.e. the storm is larger than each of the original ones
New_voltage =
    Trunc((Voltage_1 * Radius_1^2 + Voltage_2 * Radius_2^2) / (Radius_1^2 + Radius_2^2))
    ...i.e. weighed average

The Id of the new storm is the same as the Id of the stronger storm; if they are equally strong, it is the higher of the two. The new heading and speed are taken from that storm.

Whether the new storm is growing or weakening depends upon whether the computed New_voltage is odd or even.