Changes to coordinate along vector

Increased the readability in the closest coordinate along vector
functions in the Medium AI.