V
V
Valery Albertovich Zhmyshenko2020-08-22 21:01:11
Trigonometry
Valery Albertovich Zhmyshenko, 2020-08-22 21:01:11

How to define sawtooth function in lua?

There is a code in lua and there are variables Y and T in it, T - time, increases every tick when it reaches a certain threshold - resets to 0, I need a line like Y = a+(b*math.sin( T*c+ d)), only that when connected to a conditional oscilloscope, a sawtooth graph is drawn5f415d5d337d4474573312.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ayazer, 2020-08-23
@ayazer

depending on how it will be applied, this can also be done
through the Fourier series:
729ada16fa189be498408ad44594b90c.png
and simply:
x(t) = t - math.floor(t)

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question