double t = t0 + i * h;
eventFilter.g(t, new double[] { FastMath.sin(t), FastMath.cos(t) });
}
// verify old events are preserved, even if randomly accessed
RandomGenerator rng = new Well19937a(0xb0e7401265af8cd3l);
for (int i = 0; i < 5000; i++) {
double t = t0 + (t1 - t0) * rng.nextDouble();
double g = eventFilter.g(t, new double[] { FastMath.sin(t), FastMath.cos(t) });
int turn = (int) FastMath.floor((t - refSwitch) / (2 * FastMath.PI));
if (turn % 2 == 0) {
Assert.assertEquals( signEven * FastMath.sin(t), g, 1.0e-10);
} else {