Calculates the distance between two points.
source x position.
dest x position.
source y position.
dest y position.
return the distance value.
Calculates the distance between two points.