Distance
What is the distance between the following points?
(3,6), (-3,- 5)
x2 = -3 x1 = 3 y2 = -5 y1 = 6
The distance formula is derived from the Pythagorean theorem: c2 = a2 + b2
d = √[(x2 - x1)2 + (y2 - y1)2]
d = √[(-3 - 3)2 + (-5 - 6)2]
d = √[ 36 + 121]
d = √ 157 ≈ 12.52996
return