mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 17:29:06 +08:00
Minor changes everywhere, incremental progress on WindingNumber
This commit is contained in:
@ -544,12 +544,16 @@ def wiggle(t, wiggles = 2):
|
||||
|
||||
def squish_rate_func(func, a = 0.4, b = 0.6):
|
||||
def result(t):
|
||||
if a == b:
|
||||
return a
|
||||
|
||||
if t < a:
|
||||
return func(0)
|
||||
elif t > b:
|
||||
return func(1)
|
||||
else:
|
||||
return func((t-a)/(b-a))
|
||||
|
||||
return result
|
||||
|
||||
# Stylistically, should this take parameters (with default values)?
|
||||
|
Reference in New Issue
Block a user