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

            Assert.Equal(Complex.Tan(complex), exp.Execute());
            Assert.Equal(-0.0098843750383224935, result.Real, 14);
            Assert.Equal(0.96538587902213313, result.Imaginary, 14);
        }
Esempio n. 2
0
        public void ExecuteRadianTest()
        {
            var exp = new Tan(new Number(1));

            Assert.Equal(Math.Tan(1), exp.Execute(AngleMeasurement.Radian));
        }
Esempio n. 3
0
        public void ExecuteDegreeTest()
        {
            var exp = new Tan(new Number(1));

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