Update distance.hpp