use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSignum.
@Test
public void testSignum() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Signum.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 testLogOnePlusX.
@Test
public void testLogOnePlusX() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(LogOnePlusX.class, out, in);
assertEquals(out.get(), Math.log1p(1234567890), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testArcsin.
@Test
public void testArcsin() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arcsin.class, out, in);
assertEquals(out.get(), Math.asin(1234567890), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testSech.
@Test
public void testSech() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Sech.class, out, in);
assertEquals(out.get(), 1 / Math.cosh(1234567890), 0.0);
}
use of net.imglib2.type.numeric.real.DoubleType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testCsc.
@Test
public void testCsc() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Csc.class, out, in);
assertEquals(out.get(), 1 / Math.sin(1234567890), 0.0);
}
Aggregations