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); }
public void ExecuteTestException() { var exp = new Arcsec(new Bool(false)); Assert.Throws <ResultIsNotSupportedException>(() => exp.Execute()); }
public void CalculateGradianTest() { var exp = new Arcsec(new Number(1)); Assert.Equal(MathExtensions.Asec(1) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian)); }
public void CalculateDegreeTest() { var exp = new Arcsec(new Number(1)); Assert.Equal(MathExtensions.Asec(1) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree)); }