From 1245f019ae70427d1c504b0a0cdfa442905ef136 Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 4 Sep 2020 14:25:32 +0200 Subject: add math/inc and math/dec ops --- alv-lib/math.moon | 5 +++++ 1 file changed, 5 insertions(+) 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.' -- cgit v1.2.3