use the distance formula
You ll need to do it t times:
x1 y1 x2 y2
(-1, 5) (4, 2) = (-1, 5) (4, 2)
(4, 2) (0,0)
(0,0) (5,5)
(5,5) (-1, 5)
then add all your results
7.2m questions
9.5m answers