Dane Sabo 3299181c70 Auto sync: 2025-09-02 22:47:53 (10335 files changed)
M  lazy-lock.json

M  lua/custom/configs/lspconfig.lua

M  lua/custom/init.lua

A  lua/custom/journal.lua

A  nvim_venv/bin/Activate.ps1

A  nvim_venv/bin/activate

A  nvim_venv/bin/activate.csh

A  nvim_venv/bin/activate.fish
2025-09-02 22:47:53 -04:00

33 lines
703 B
Python

from .functions import defun_wrapped
@defun_wrapped
def squarew(ctx, t, amplitude=1, period=1):
P = period
A = amplitude
return A*((-1)**ctx.floor(2*t/P))
@defun_wrapped
def trianglew(ctx, t, amplitude=1, period=1):
A = amplitude
P = period
return 2*A*(0.5 - ctx.fabs(1 - 2*ctx.frac(t/P + 0.25)))
@defun_wrapped
def sawtoothw(ctx, t, amplitude=1, period=1):
A = amplitude
P = period
return A*ctx.frac(t/P)
@defun_wrapped
def unit_triangle(ctx, t, amplitude=1):
A = amplitude
if t <= -1 or t >= 1:
return ctx.zero
return A*(-ctx.fabs(t) + 1)
@defun_wrapped
def sigmoid(ctx, t, amplitude=1):
A = amplitude
return A / (1 + ctx.exp(-t))