/// <summary> /// The GetQuarterCups method gets the greatest number of quarter cups /// that can be formed from given number of teaspoons /// </summary> /// <param name="teaspoons">Fraction representing number of teaspoons</param> /// <returns>Greatest number of quarter cups that can be formed</returns> private static int GetQuarterCups(Fraction teaspoons) { return(teaspoons.WholePart() / RecipeConstants.TSP_PER_QUARTER_CUP); }
/// <summary> /// The GetThirdCups method gets the greatest number of third cups /// that can be formed from given number of teaspoons /// </summary> /// <param name="teaspoons">Fraction representing number of teaspoons</param> /// <returns>Greatest number of third cups that can be formed</returns> private static int GetThirdCups(Fraction teaspoons) { return(teaspoons.WholePart() / RecipeConstants.TSP_PER_THIRD_CUP); }