Fixed unit test tests/TestCylinderAreas.cpp

This commit is contained in:
James E McClure 2014-10-16 16:57:46 -04:00
parent 17cb7e00e3
commit ace9811e1a

View File

@ -274,7 +274,7 @@ int main (int argc, char *argv[])
toReturn += 1;
printf("TestCylinderArea.cpp: error tolerance exceeded for wn area \n");
}
if (fabs(ans - 2*PI*RADIUS*(N-2)-4*PI*RADIUS*HEIGHT)/(2*PI*RADIUS*(N-2)-4*PI*RADIUS*HEIGHT) > 0.05 ){
if (fabs(ans - (2*PI*RADIUS*(N-2)-4*PI*RADIUS*HEIGHT)))/(2*PI*RADIUS*(N-2)-4*PI*RADIUS*HEIGHT)) > 0.02 ){
toReturn += 2;
printf("TestCylinderArea.cpp: error tolerance exceeded for ns area \n");
}