1
0
Fork 0
mirror of http://GITTEA.DEV/O/O synced 2024-10-06 00:37:59 +02:00

ᗱᗴߦᗱᗴᑐᑕИNᑐᑕᗱᗴᑐᑕᗱᗴᑐᑕᗱᗴߦᔓᔕᔓᔕߦᗱᗴᑐᑕᗱᗴᑐᑕᗱᗴᑐᑕИNᑐᑕᗱᗴߦᗱᗴ

This commit is contained in:
2023-11-12 18:22:00 +00:00
parent 48268b0f94
commit 6adf3c1fef
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ def clamp(x):
def kappa(formula, x): def kappa(formula, x):
func_dict = {fn: eval(f'lambda *args: mpmath.{fn}(*args)') for fn in dir(mpmath)} func_dict = {fn: eval(f'lambda *args: mpmath.{fn}(*args)') for fn in dir(mpmath)}
return float(eval(formula, {'x': x, 'clamp': clamp, **func_dict})) return float(eval(formula, {'x': x, 'clamp': clamp, **func_dict}))
def plot(formula='(1 - cos(((4)/2)*x))/2', RANGE_FROM=0, RANGE_TO=4*pi, N=10): def plot(formula='(1 - cos(((4)/2)*x))/2', RANGE_FROM=0, RANGE_TO=4*pi, N=8):
num_points = 1+2**N num_points = 1+2**N
# Generate x values with the specified number of points # Generate x values with the specified number of points