summaryrefslogtreecommitdiff
path: root/src/misc.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-08-06 22:17:54 +1000
committerJed Barber <jjbarber@y7mail.com>2017-08-06 22:17:54 +1000
commit7cef684e71b64f00b41da66ba7bc581568d78f51 (patch)
treec187a50b13961b0cd8227dd0d54ec7958f131bbf /src/misc.adb
parent051ddb2a265dda897bce72edc318beadd111eba2 (diff)
Factored out some trivial bits into Misc, made coding style more consistent
Diffstat (limited to 'src/misc.adb')
-rw-r--r--src/misc.adb31
1 files changed, 31 insertions, 0 deletions
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;
+