From 7cef684e71b64f00b41da66ba7bc581568d78f51 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 6 Aug 2017 22:17:54 +1000 Subject: Factored out some trivial bits into Misc, made coding style more consistent --- src/misc.adb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/misc.adb (limited to 'src/misc.adb') diff --git a/src/misc.adb b/src/misc.adb new file mode 100644 index 0000000..d1aa7ca --- /dev/null +++ b/src/misc.adb @@ -0,0 +1,31 @@ + + +package body Misc is + + + function Max + (A, B : in Integer) + return Integer is + begin + if B > A then + return B; + else + return A; + end if; + end Max; + + + function Min + (A, B : in Integer) + return Integer is + begin + if B < A then + return B; + else + return A; + end if; + end Min; + + +end Misc; + -- cgit