Spaces with bounded curvature and distance geometry