aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alv-lib/math.moon5
1 files changed, 5 insertions, 0 deletions
diff --git a/alv-lib/math.moon b/alv-lib/math.moon
index a63f124..7f76ce9 100644
--- a/alv-lib/math.moon
+++ b/alv-lib/math.moon
@@ -132,6 +132,9 @@ max = Constant.meta
description: "Return the highest of arguments."
value: func_op math.max, num*0
+inc = func_def 'inc', 'i', ((i) -> i + 1), "Increment by 1."
+dec = func_def 'dec', 'i', ((i) -> i - 1), "Decrement by 1."
+
cos = func_def 'cos', 'alpha', math.cos, "Cosine function (radians)."
sin = func_def 'sin', 'alpha', math.sin, "Sine function (radians)."
tan = func_def 'tan', 'alpha', math.tan, "Tangent function (radians)."
@@ -170,6 +173,8 @@ Constant.meta
:mix
:min, :max
+ :inc, :dec
+
pi: Constant.meta
value: math.pi
meta: summary: 'The pi constant.'