From: stephey Date: Tue, 29 Mar 2011 07:26:27 +0000 (+0000) Subject: Added min/max for long X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=832295439b0220404e8a7000449b652fecbfef25;p=IRC.git Added min/max for long --- diff --git a/Robust/src/ClassLibrary/Math.java b/Robust/src/ClassLibrary/Math.java index 7e6a59f6..3e6cb49b 100644 --- a/Robust/src/ClassLibrary/Math.java +++ b/Robust/src/ClassLibrary/Math.java @@ -61,6 +61,26 @@ public class Math { } } + public static long max(long a, long b) { + if(a == b) + return a; + if(a > b) { + return a; + } else { + return b; + } + } + + public static long min(long a, long b) { + if(a == b) + return a; + if(a > b) { + return b; + } else { + return a; + } + } + public static int imax(int a, int b) { if(a == b) return a;