Switched to shellscript

(less overhead overall)
This commit is contained in:
2022-08-21 14:27:44 +01:00
parent b3c4b5e81e
commit 25ea50ae8a
7 changed files with 12 additions and 126 deletions

10
shellmath.sh Normal file
View File

@@ -0,0 +1,10 @@
# Shellmath v2
# Works in most bourne-type shells.
# Partially reimplemented in shell script due to less overhead.
function add { echo $(($1+$2)); }
function sub { echo $(($1-$2)); }
function mul { echo $(($1*$2)); }
function div { echo $(($1/$2)); }
function mdl { echo $(($1%$2)); }
function randr { echo $(($1+$RANDOM%$2)); }