示例#1
0
文件: SecantTest.cs 项目: sys27/xFunc
        public void ExecuteComplexNumberTest()
        {
            var complex = new Complex(3, 2);
            var exp = new Sec(new ComplexNumber(complex));
            var result = (Complex)exp.Execute();

            Assert.Equal(ComplexExtensions.Sec(complex), result);
            Assert.Equal(-0.26351297515838928, result.Real, 15);
            Assert.Equal(0.036211636558768523, result.Imaginary, 15);
        }
示例#2
0
文件: SecantTest.cs 项目: sys27/xFunc
        public void ExecuteRadianTest()
        {
            var exp = new Sec(new Number(1));

            Assert.Equal(MathExtensions.Sec(1), (double)exp.Execute(AngleMeasurement.Radian), 15);
        }
示例#3
0
文件: SecantTest.cs 项目: sys27/xFunc
        public void ExecuteGradianTest()
        {
            var exp = new Sec(new Number(1));

            Assert.Equal(MathExtensions.Sec(Math.PI / 200), exp.Execute(AngleMeasurement.Gradian));
        }
示例#4
0
文件: SecantTest.cs 项目: sys27/xFunc
        public void ExecuteDegreeTest()
        {
            var exp = new Sec(new Number(1));

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