When mileage is allowed by law to any person, the distance shall be computed as fixed in this chapter.