From 227c13d12c0a278df22cf9e5f1e09bfb4ce05c1e Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Thu, 8 Sep 2005 12:58:17 +0000 Subject: [PATCH] Added abs(x) stock --- plugins/include/core.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/include/core.inc b/plugins/include/core.inc index 7acfc8dd..4441f49e 100755 --- a/plugins/include/core.inc +++ b/plugins/include/core.inc @@ -38,4 +38,9 @@ native sqroot(value); native time(&hour=0,&minute=0,&second=0); native date(&year=0,&month=0,&day=0); -native tickcount(&granularity=0); \ No newline at end of file +native tickcount(&granularity=0); + +stock abs(x) +{ + return x > 0 ? x : -x; +} \ No newline at end of file