git://source.jalview.org
/
jalview.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'features/JAL-2349_matrixvis' into merge/develop_JAL-2340_matrixvis
[jalview.git]
/
src
/
jalview
/
util
/
MathUtils.java
1
package jalview.util;
2
3
public class MathUtils
4
{
5
6
/**
7
* Returns the greatest common divisor of two integers
8
*
9
* @param a
10
* @param b
11
* @return
12
*/
13
public static int gcd(int a, int b)
14
{
15
if (b == 0)
16
{
17
return Math.abs(a);
18
}
19
return gcd(b, a % b);
20
}
21
22
}