Greatest common divisor of a and b.
a
b
static int gcd(int a, int b) { a = a.abs(); b = b.abs(); while (b != 0) { final t = b; b = a % b; a = t; } return a; }