removed remnants of development tests
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@619980 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1cabcd496c
commit
24763608bf
|
@ -20,7 +20,6 @@ import junit.framework.TestCase;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
import org.apache.commons.math.TestUtils;
|
import org.apache.commons.math.TestUtils;
|
||||||
import org.apache.commons.math.stat.descriptive.SummaryStatistics;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test cases for the MathUtils class.
|
* Test cases for the MathUtils class.
|
||||||
|
@ -523,14 +522,12 @@ public final class MathUtilsTest extends TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNormalizeAngle() {
|
public void testNormalizeAngle() {
|
||||||
SummaryStatistics stat = new SummaryStatistics();
|
|
||||||
for (double a = -15.0; a <= 15.0; a += 0.1) {
|
for (double a = -15.0; a <= 15.0; a += 0.1) {
|
||||||
for (double b = -15.0; b <= 15.0; b += 0.2) {
|
for (double b = -15.0; b <= 15.0; b += 0.2) {
|
||||||
double c = MathUtils.normalizeAngle(a, b);
|
double c = MathUtils.normalizeAngle(a, b);
|
||||||
assertTrue((b - Math.PI) <= c);
|
assertTrue((b - Math.PI) <= c);
|
||||||
assertTrue(c <= (b + Math.PI));
|
assertTrue(c <= (b + Math.PI));
|
||||||
double twoK = Math.rint((a - c) / Math.PI);
|
double twoK = Math.rint((a - c) / Math.PI);
|
||||||
stat.addValue(c - a + twoK * Math.PI);
|
|
||||||
assertEquals(c, a - twoK * Math.PI, 1.0e-14);
|
assertEquals(c, a - twoK * Math.PI, 1.0e-14);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue