mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 14:03:59 +08:00
Added simple midpoint function
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user