예제 #1
0
        /// <summary>
        /// Method that computes the cosine of the grad angle
        /// </summary>
        /// <param name="first">Parameter that is entered by the user</param>
        /// <returns>Calculated value</returns>
        public double Calculate(double first)
        {
            var converter  = new GradToRadConverter();
            var calculator = new CosCalc();

            return(calculator.Calculate(converter.Calculate(first)));
        }
예제 #2
0
        public void CosCalcTest(double first, double expected)
        {
            var    calc   = new CosCalc();
            double result = calc.Calculate(first);

            Assert.AreEqual(expected, result, 0.001);
        }