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); }
public void ExecuteRadianTest() { var exp = new Sec(new Number(1)); Assert.Equal(MathExtensions.Sec(1), (double)exp.Execute(AngleMeasurement.Radian), 15); }
public void ExecuteGradianTest() { var exp = new Sec(new Number(1)); Assert.Equal(MathExtensions.Sec(Math.PI / 200), exp.Execute(AngleMeasurement.Gradian)); }
public void ExecuteDegreeTest() { var exp = new Sec(new Number(1)); Assert.Equal(MathExtensions.Sec(Math.PI / 180), exp.Execute(AngleMeasurement.Degree)); }