diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2020-09-04 12:25:32 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2020-09-04 13:32:21 +0000 |
| commit | 010b92de5236f9ae14cb6a64a56e533f5654bada (patch) | |
| tree | f76ef64948cf3f19b74f860871589456ecbde30b | |
| parent | update scm rockspec (diff) | |
| download | alive-010b92de5236f9ae14cb6a64a56e533f5654bada.tar.gz alive-010b92de5236f9ae14cb6a64a56e533f5654bada.zip | |
add math/inc and math/dec ops
| -rw-r--r-- | alv-lib/math.moon | 5 |
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.' |
