function getGreatestCommonDivisor (a, b) {
  if (a === 0) return b

  while (b !== 0) {
    const t = b
    b = a % b
    a = t
  }
  return a
}
Calculate the greatest common divisor of two numbers by
using the Euclidean algorithm.

@param {number} a
@param {number} b
@returns {number}