And now:

dx += (320-360)/2 => dx = -60 -20 = -80
dy += (480 - 480)/2 => dy = 60