Returns the distance between (x1, y1) and (x2, y2) by using the Pythagorean Theorem.
(x1, y1, x2, y2)
| 179 | |
| 180 | |
| 181 | def getDistance(x1, y1, x2, y2): |
| 182 | """Returns the distance between (x1, y1) and (x2, y2) by using the |
| 183 | Pythagorean Theorem.""" |
| 184 | return math.sqrt(((x1 - x2) ** 2) + ((y1 - y2) ** 2)) |
| 185 | |
| 186 | |
| 187 | def line(x1, y1, x2, y2): |