cpml: add and test cpml_angle_distance