aboutsummaryrefslogtreecommitdiff
path: root/bc_funcs
diff options
context:
space:
mode:
authorMango0x45 <thomasvoss@live.com>2021-01-05 08:50:59 +0000
committerMango0x45 <thomasvoss@live.com>2021-01-05 08:50:59 +0000
commit4fd5dd089a227e4e05aac5608631ee478a3c4c00 (patch)
treeeb2812c1c0c17abd3de64197a378911a161d5ec5 /bc_funcs
parentb4abc23d61ae6647d128fa2baac4198c1b35520d (diff)
downloadsteve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar.gz
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar.bz2
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar.lz
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar.xz
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.tar.zst
steve-bot-4fd5dd089a227e4e05aac5608631ee478a3c4c00.zip
Add absolute value function
Diffstat (limited to 'bc_funcs')
-rw-r--r--bc_funcs/std.bc5
1 files changed, 5 insertions, 0 deletions
diff --git a/bc_funcs/std.bc b/bc_funcs/std.bc
new file mode 100644
index 0000000..a369505
--- /dev/null
+++ b/bc_funcs/std.bc
@@ -0,0 +1,5 @@
+define abs(x) {
+ if (x < 0)
+ x *= -1
+ return x
+}