// special cases
for (int i = 0; i < 100; i++) {
double min = Math.random() * 100000 - 50000;
double max = Math.random() * 100000 + min;
IAxis referenceAxis = new MidLogarithmicAxis();
axis.setMinimumMaximum(min, max);
axis.setLogStartPointValue((max - min) / 2 + min);
referenceAxis.setMinimum(min);
referenceAxis.setMaximum(max);
for (int j = 0; j < 1000; j++) {
double v = Math.random() * (max - min) + min;
assertEquals(referenceAxis.transform(v), axis.transform(v), 0.00000001);
}
}
for (int i = 0; i < 100; i++) {
double min = Math.random() * 100000 - 50000;
double max = Math.random() * 100000 + min;
IAxis referenceAxis = new SimpleLogarithmicAxis();
axis.setMinimumMaximum(min, max);
axis.setLogStartPointValue(min);
referenceAxis.setMinimum(min);
referenceAxis.setMaximum(max);
for (int j = 0; j < 1000; j++) {
double v = Math.random() * (max - min) + min;
assertEquals(referenceAxis.transform(v), axis.transform(v), 0.00000001);
}
}
// small test for symmetry around the basePointValue