mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Added simple midpoint function
This commit is contained in:
parent
d1e3e5ed20
commit
29424eb6b3
1 changed files with 4 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue