projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34b3909
)
Added min/max for long
author
stephey
<stephey>
Tue, 29 Mar 2011 07:26:27 +0000
(07:26 +0000)
committer
stephey
<stephey>
Tue, 29 Mar 2011 07:26:27 +0000
(07:26 +0000)
Robust/src/ClassLibrary/Math.java
patch
|
blob
|
history
diff --git
a/Robust/src/ClassLibrary/Math.java
b/Robust/src/ClassLibrary/Math.java
index 7e6a59f648ed6a1b206cb6245acffb2d37118e78..3e6cb49b764ca95967531421312cbed224feb527 100644
(file)
--- 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;