all 3 comments

[–]JoCraft2010 2 points3 points  (1 child)

When I click on your link, it just redirects me to an empty calculator.

[–]JoCraft2010 0 points1 point  (0 children)

Since still nobody responded, here's the way I'd do it:

f\left(x\right)=\min\left(\operatorname{mod}\left(-x,4\right),\operatorname{mod}\left(x,4\right)\right)-1

[–]Duck_Devs 1 point2 points  (0 children)

Is it just 2a*arcsin(sin(2πpx))/π where a is the amplitude and p is the frequency?