Ejemplo n.º 1
0
        public void Atan_Int_ReturnInt()
        {
            // arrange
            var sp = new ScalarPrimitives <int, int>();

            // action
            var result = sp.Atan(-2);

            // assert
            Assert.AreEqual(-1, result);
        }
Ejemplo n.º 2
0
        public void Atan_Double_ReturnDouble()
        {
            // arrange
            var sp = new ScalarPrimitives <double, double>();

            // action
            var result = sp.Atan(1);

            // assert
            const double Epsilon = 1e-8;

            Assert.IsTrue(Math.Abs(0.785398163397448 - result) < Epsilon);
        }