Created
November 11, 2014 09:12
-
-
Save abreslav/173c32a30f9f94e1cd9a to your computer and use it in GitHub Desktop.
Revisions
-
abreslav created this gist
Nov 11, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ class Ratio(num : Int, denom : Int) { val numerator: Int val denominator: Int { val theGcd = gcd(num, denom) numerator = num / theGcd denominator = denom / theGcd } }