Finding the unit vector in a given direction.