Ejemplo n.º 1
0
        public void ExecuteComplexNumberTest()
        {
            var complex = new Complex(3, 2);
            var exp     = new Arccot(new ComplexNumber(complex));
            var result  = (Complex)exp.Execute();

            Assert.Equal(ComplexExtensions.Acot(complex), result);
            Assert.Equal(0.23182380450040308, result.Real, 15);
            Assert.Equal(-0.14694666622552988, result.Imaginary, 15);
        }
Ejemplo n.º 2
0
        public void ExecuteTestException()
        {
            var exp = new Arccot(new Bool(false));

            Assert.Throws <ResultIsNotSupportedException>(() => exp.Execute());
        }
Ejemplo n.º 3
0
        public void ExecuteGradianTest()
        {
            var exp = new Arccot(new Number(1));

            Assert.Equal(MathExtensions.Acot(1) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian));
        }
Ejemplo n.º 4
0
        public void ExecuteDegreeTest()
        {
            var exp = new Arccot(new Number(1));

            Assert.Equal(MathExtensions.Acot(1) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree));
        }