Commit e3b935fb authored by Tony Alas's avatar Tony Alas
Browse files

added negative pi as a test case

parent 24885267
No preview for this file type
......@@ -16,6 +16,8 @@ public class TrigTest {
double x3;
double x4;
double x5;
double x6;
static double negPI = -3.1415926535;
static double PI = 3.1415926535;
//Setting up the variables
......@@ -28,6 +30,7 @@ public class TrigTest {
x3 = PI;
x4 = 45;
x5 = 180;
x6 = negPI;
}
//Tests to ensure that the Cos funciton in Trig works properly
......@@ -38,6 +41,7 @@ public class TrigTest {
assertEquals(t.trigCos(x1), Math.cos(x1), 0.000005);
assertEquals(t.trigCos(x2), Math.cos(x2), 0.000005);
assertEquals(t.trigCos(x3), Math.cos(x3), 0.000005);
assertEquals(t.trigCos(x6), Math.cos(x6), 0.000005);
}
//Tests to ensure that the Sin funciton in Trig works properly
......@@ -47,6 +51,7 @@ public class TrigTest {
assertEquals(t.trigSin(x1), Math.sin(x1), 0.000005);
assertEquals(t.trigSin(x2), Math.sin(x2), 0.000005);
assertEquals(t.trigSin(x3), Math.sin(x3), 0.000005);
assertEquals(t.trigSin(x6), Math.sin(x6), 0.000005);
}
//Tests to ensure that the Tan funciton in Trig works properly
......@@ -56,6 +61,7 @@ public class TrigTest {
assertEquals(t.trigTan(x1), Math.tan(x1), 0.000005);
assertEquals(t.trigTan(x2), Math.tan(x2), 0.000005);
assertEquals(t.trigTan(x3), Math.tan(x3), 0.000005);
assertEquals(t.trigTan(x6), Math.tan(x6), 0.000005);
}
//Tests to ensure that the degree to rad funciton in Trig works properly
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment