I think you got confused? I want to find the distance between any two points, but it seems your function only returns the distance between points (0,0) and (a,b)?