Distance between two points using Pythagoras theorem