Added simple midpoint function

This commit is contained in:
Grant Sanderson
2019-05-27 19:48:33 -07:00
parent d1e3e5ed20
commit 29424eb6b3

View File

@ -205,6 +205,10 @@ def center_of_mass(points):
return sum(points) / len(points)
def midpoint(point1, point2):
return center_of_mass([point1, point2])
def line_intersection(line1, line2):
"""
return intersection point of two lines,