diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-08-06 22:17:54 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-08-06 22:17:54 +1000 |
commit | 7cef684e71b64f00b41da66ba7bc581568d78f51 (patch) | |
tree | c187a50b13961b0cd8227dd0d54ec7958f131bbf /src/misc.adb | |
parent | 051ddb2a265dda897bce72edc318beadd111eba2 (diff) |
Factored out some trivial bits into Misc, made coding style more consistent
Diffstat (limited to 'src/misc.adb')
-rw-r--r-- | src/misc.adb | 31 |
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; + |