public void ExecuteComplexNumberTest() { var complex = new Complex(3, 2); var exp = new Arccos(new ComplexNumber(complex)); var result = (Complex)exp.Execute(); Assert.Equal(Complex.Acos(complex), result); Assert.Equal(0.60613782238729386, result.Real, 15); Assert.Equal(-1.9686379257930964, result.Imaginary, 15); }
public void ExecuteTestException() { var exp = new Arccos(new Bool(false)); Assert.Throws <ResultIsNotSupportedException>(() => exp.Execute()); }
public void ExecuteGradianTest() { var exp = new Arccos(new Number(1)); Assert.Equal(Math.Acos(1) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian)); }
public void ExecuteDegreeTest() { var exp = new Arccos(new Number(1)); Assert.Equal(Math.Acos(1) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree)); }