Exemplo n.º 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.Acoth(radian));
 }
Exemplo n.º 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.Acoth(gradian) / Math.PI * 200);
 }
Exemplo n.º 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.Acoth(degree) / Math.PI * 180);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Executes this expression.
 /// </summary>
 /// <param name="parameters">An object that contains all parameters and functions for expressions.</param>
 /// <returns>
 /// A result of the execution.
 /// </returns>
 /// <seealso cref="ExpressionParameters" />
 protected override double ExecuteNumber(ExpressionParameters parameters)
 {
     return(MathExtensions.Acoth((double)m_argument.Execute(parameters)));
 }
Exemplo n.º 5
0
        public void ExecuteGradianTest()
        {
            var exp = new Arcoth(new Number(0.5));

            Assert.Equal(MathExtensions.Acoth(0.5) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian));
        }
Exemplo n.º 6
0
        public void ExecuteDegreeTest()
        {
            var exp = new Arcoth(new Number(0.5));

            Assert.Equal(MathExtensions.Acoth(0.5) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree));
        }
Exemplo n.º 7
0
        public void ExecuteTest()
        {
            var exp = new Arcoth(new Number(1));

            Assert.Equal(MathExtensions.Acoth(1), exp.Execute());
        }