CaAlgorithms: Use Point2d's distance function