Пример #1
0
 /// <summary>
 /// Calculates this mathematical expression (using radian).
 /// </summary>
 /// <param name="radian">The calculation result of argument.</param>
 /// <returns>
 /// A result of the calculation.
 /// </returns>
 /// <seealso cref="ExpressionParameters" />
 protected override double ExecuteRadian(double radian)
 {
     return(MathExtensions.Acot(radian));
 }
Пример #2
0
 /// <summary>
 /// Calculates this mathematical expression (using gradian).
 /// </summary>
 /// <param name="gradian">The calculation result of argument.</param>
 /// <returns>
 /// A result of the calculation.
 /// </returns>
 /// <seealso cref="ExpressionParameters" />
 protected override double ExecuteGradian(double gradian)
 {
     return(MathExtensions.Acot(gradian) / Math.PI * 200);
 }
Пример #3
0
 /// <summary>
 /// Calculates this mathematical expression (using degree).
 /// </summary>
 /// <param name="degree">The calculation result of argument.</param>
 /// <returns>
 /// A result of the calculation.
 /// </returns>
 /// <seealso cref="ExpressionParameters" />
 protected override double ExecuteDergee(double degree)
 {
     return(MathExtensions.Acot(degree) / Math.PI * 180);
 }
Пример #4
0
        public void ExecuteGradianTest()
        {
            var exp = new Arccot(new Number(1));

            Assert.Equal(MathExtensions.Acot(1) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian));
        }
Пример #5
0
        public void ExecuteDegreeTest()
        {
            var exp = new Arccot(new Number(1));

            Assert.Equal(MathExtensions.Acot(1) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree));
        }
Пример #6
0
        /// <summary>
        /// Calculates this mathematical expression (using gradian).
        /// </summary>
        /// <param name="parameters">An object that contains all parameters and functions for expressions.</param>
        /// <returns>
        /// A result of the calculation.
        /// </returns>
        /// <seealso cref="ExpressionParameters" />
        protected override double ExecuteGradian(ExpressionParameters parameters)
        {
            var radian = (double)m_argument.Execute(parameters);

            return(MathExtensions.Acot(radian) / Math.PI * 200);
        }
Пример #7
0
 /// <summary>
 /// Calculates this mathematical expression (using radian).
 /// </summary>
 /// <param name="parameters">An object that contains all parameters and functions for expressions.</param>
 /// <returns>
 /// A result of the calculation.
 /// </returns>
 /// <seealso cref="ExpressionParameters" />
 protected override double ExecuteRadian(ExpressionParameters parameters)
 {
     return(MathExtensions.Acot((double)m_argument.Execute(parameters)));
 }