Example #1
0
 public void testSin() {
   assertEquals(Vba.sqr(0.5d), Vba.sin(Math.PI / 4d), SMALL);
 }
Example #2
0
 public void testSqr() {
   assertEquals(2d, Vba.sqr(4d), 0d);
   assertEquals(0d, Vba.sqr(0d), 0d);
   assertTrue(Double.isNaN(Vba.sqr(-4)));
 }
Example #3
0
 public void testCos() {
   assertEquals(1d, Vba.cos(0), 0d);
   assertEquals(Vba.sqr(0.5d), Vba.cos(Math.PI / 4d), 0d);
   assertEquals(0d, Vba.cos(Math.PI / 2d), SMALL);
   assertEquals(-1d, Vba.cos(Math.PI), 0d);
 }