Distance between two points and direction vector