mirror of
https://github.com/3b1b/manim.git
synced 2025-07-30 05:24:22 +08:00
Simple and small performance improvements
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
from scipy import linalg
|
||||
from utils.simple_functions import choose
|
||||
from utils.simple_functions import choose_using_cache
|
||||
from utils.space_ops import get_norm
|
||||
|
||||
CLOSED_THRESHOLD = 0.001
|
||||
@ -10,7 +10,7 @@ CLOSED_THRESHOLD = 0.001
|
||||
def bezier(points):
|
||||
n = len(points) - 1
|
||||
return lambda t: sum([
|
||||
((1 - t)**(n - k)) * (t**k) * choose(n, k) * point
|
||||
((1 - t)**(n - k)) * (t**k) * choose_using_cache(n, k) * point
|
||||
for k, point in enumerate(points)
|
||||
])
|
||||
|
||||
|
Reference in New Issue
Block a user