aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/math.moon2
-rw-r--r--lib/time.moon4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/math.moon b/lib/math.moon
index 8ada38a..8e54bbd 100644
--- a/lib/math.moon
+++ b/lib/math.moon
@@ -50,6 +50,8 @@ module = {
:div, '/': div
mix: func_op 'mix', 3, (a, b, i) -> i*b + (1-i)*a
+
+ pi: math.pi, huge: math.huge
}
for name, arity in pairs {
diff --git a/lib/time.moon b/lib/time.moon
index f2ad70c..4fe5d7c 100644
--- a/lib/time.moon
+++ b/lib/time.moon
@@ -6,7 +6,9 @@ class lfo extends Op
super ...
@phase = 0
- setup: (@freq, @wave=Const 'sin') =>
+
+ default_wave = Const 'str', 'sin'
+ setup: (@freq, @wave=default_wave) =>
update: (dt) =>
@phase += dt * @freq\get!