Added min/max for long
authorstephey <stephey>
Tue, 29 Mar 2011 07:26:27 +0000 (07:26 +0000)
committerstephey <stephey>
Tue, 29 Mar 2011 07:26:27 +0000 (07:26 +0000)
Robust/src/ClassLibrary/Math.java

index 7e6a59f648ed6a1b206cb6245acffb2d37118e78..3e6cb49b764ca95967531421312cbed224feb527 100644 (file)
@@ -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;