github.com/fufuok/balancer@v1.0.0/utils/gcd.go (about) 1 package utils 2 3 // GCD Greatest Common Divisor 4 func GCD(x, y int) int { 5 for y != 0 { 6 x, y = y, x%y 7 } 8 return x 9 }