Add math function for animation
This commit is contained in:
parent
f0fa8ef459
commit
3c21c6c581
@ -201,6 +201,14 @@ function recurseModelGroup(group)
|
|||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
-- Math {{{
|
||||||
|
--- Sine function with period and amplitude
|
||||||
|
--- @param x number Input value
|
||||||
|
--- @param period number Period of sine wave
|
||||||
|
--- @param amp number Peak amplitude of sine wave
|
||||||
|
function wave(x, period, amp) return math.sin((2/period)*math.pi*(x%period))*amp end
|
||||||
|
-- }}}
|
||||||
|
|
||||||
-- master state variables and configuration (do not access within pings) -- {{{
|
-- master state variables and configuration (do not access within pings) -- {{{
|
||||||
if client.isHost() then
|
if client.isHost() then
|
||||||
local defaults={
|
local defaults={
|
||||||
|
Loading…
x
Reference in New Issue
Block a user