Created
August 1, 2017 21:46
-
-
Save TravisMullen/32d2d5b2a3dcfe6b49e02b8e281cf091 to your computer and use it in GitHub Desktop.
greatest common denom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function getGCD (a, b) { | |
for (let c; b; a = b, b = c) { | |
c = a % b | |
} | |
return a | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment