use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testArccosh.
@Test
public void testArccosh() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arccosh.class, out, in);
final double delta = Math.sqrt(1234567890.0 * 1234567890.0 - 1);
assertEquals(out.get(), Math.log(1234567890 + delta), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testStep.
@Test
public void testStep() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Step.class, out, in);
assertEquals(out.get(), 1.0, 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSin.
@Test
public void testSin() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sin.class, out, in);
assertEquals(out.get(), Math.sin(1234567890), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testLog10.
@Test
public void testLog10() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Log10.class, out, in);
assertEquals(out.get(), Math.log10(1234567890), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSincPi.
@Test
public void testSincPi() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(SincPi.class, out, in);
final double PI = Math.PI;
assertEquals(out.get(), Math.sin(PI * 1234567890) / (PI * 1234567890), 0.0);
}
Aggregations