mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Use generator instead of list in bezier
This commit is contained in:
parent
6376f0a8cc
commit
eb245f6fdb
1 changed files with 2 additions and 2 deletions
|
@ -14,10 +14,10 @@ def bezier(points):
|
|||
n = len(points) - 1
|
||||
|
||||
def result(t):
|
||||
return sum([
|
||||
return sum(
|
||||
((1 - t)**(n - k)) * (t**k) * choose(n, k) * point
|
||||
for k, point in enumerate(points)
|
||||
])
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue