public static int gcd(int a, int b) { // gcd returns an int and takes two ints as arguments
		if (Math.min(a, b) == 0) { // If the smaller of (a, b) is 0:
			return Math.max(a, b); // The gcd of a and b is the larger of (a, b), by Euclid's algorithm
		}

		else { // If neither of (a, b) are 0:
			return gcd(Math.min(a, b), Math.max(a, b) % Math.min(a, b)); // The gcd of a and b is gcd(b, a % b) by Euclid's algorithm
		}
	}