use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testMin.
@Test
public void testMin() {
final LongType in = new LongType(LARGE_NUM);
final LongType out = (LongType) ops.run(MinConstant.class, in.createVariable(), in, LARGE_NUM - 1.0);
assertEquals(out.get(), LARGE_NUM - 1);
}
use of net.imglib2.type.numeric.integer.LongType 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);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testArccoth.
@Test
public void testArccoth() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arccoth.class, out, in);
final double result = 0.5 * Math.log(1234567891.0 / 1234567889.0);
assertEquals(out.get(), result, 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testArctan.
@Test
public void testArctan() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Arctan.class, out, in);
assertEquals(out.get(), Math.atan(1234567890), 0.0);
}
use of net.imglib2.type.numeric.integer.LongType in project imagej-ops by imagej.
the class UnaryRealTypeMathTest method testLog2.
@Test
public void testLog2() {
final LongType in = new LongType(1234567890);
final DoubleType out = new DoubleType();
ops.run(Log2.class, out, in);
assertEquals(out.get(), Math.log(1234567890) / Math.log(2), 0.0);
}
Aggregations