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

            Assert.Equal(ComplexExtensions.Asec(complex), exp.Execute());
            Assert.Equal(1.3408334244176887, result.Real, 15);
            Assert.Equal(0.15735549884498545, result.Imaginary, 15);
        }
Ejemplo n.º 2
0
        public void ExecuteTestException()
        {
            var exp = new Arcsec(new Bool(false));

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

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

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