Skip to content

Instantly share code, notes, and snippets.

Created November 11, 2014 09:12
What would you like to do?
class Ratio(num : Int, denom : Int) {
val numerator: Int
val denominator: Int
val theGcd = gcd(num, denom)
numerator = num / theGcd
denominator = denom / theGcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment