def edist(p0, p1 = V(0, 0), sqpow = 0.5):
(x1, y1, x2, y2) = (p0[0], p0[1], p1[0], p1[1]);
return ( ((x1 - x2) ** 2) + ((y1 - y2) ** 2) ) ** sqpow;
##def
## sort_points_complex
# Sorts a list of 2D points, or tuples, using the numpy sort_complex routine
# @param points_list A list of 2D points
# @return A sorted list containing the original points
# sorted first with respect to the first coordinates, then
# with respect to the second
##
评论列表
文章目录