From b29b6368a6241744ce47f3601fd52d4df61c2ad0 Mon Sep 17 00:00:00 2001 From: firleju Date: Fri, 30 Dec 2016 22:12:20 +0100 Subject: [PATCH] =?UTF-8?q?Dodanie=20implementacji=20funkcji=20abs()=20bra?= =?UTF-8?q?kuj=C4=85cej=20w=20BCB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- McZapkie/mctools.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/McZapkie/mctools.h b/McZapkie/mctools.h index e777f8cb..cc39ce3a 100644 --- a/McZapkie/mctools.h +++ b/McZapkie/mctools.h @@ -83,6 +83,16 @@ inline double Random(double b) return Random(0.0, b); } +inline double abs(double _val) +{ + return _val < 0 ? -_val : _val; +} + +inline long abs(long _val) +{ + return _val < 0 ? -_val : _val; +} + inline double BorlandTime() { std::tm epoch;