本文整理了Java中net.imglib2.util.Util.round()
方法的一些代码示例,展示了Util.round()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.round()
方法的具体详情如下:
包路径:net.imglib2.util.Util
类名称:Util
方法名:round
暂无
代码示例来源:origin: net.imglib2/imglib2
@Override
public void setReal( final float real )
{
setInteger( Util.round( real ) );
}
代码示例来源:origin: imglib/imglib2
/**
* Create and integer packed representation of this ARGB value. Crop
*/
public int toARGBInt()
{
final int a = ( int ) Math.max( 0, Math.min( 255, Util.round( getA() * 255 ) ) );
final int r = ( int ) Math.max( 0, Math.min( 255, Util.round( getR() * 255 ) ) );
final int g = ( int ) Math.max( 0, Math.min( 255, Util.round( getG() * 255 ) ) );
final int b = ( int ) Math.max( 0, Math.min( 255, Util.round( getB() * 255 ) ) );
return ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b;
}
代码示例来源:origin: net.imglib2/imglib2
/**
* Create and integer packed representation of this ARGB value. Crop
*/
public int toARGBInt()
{
final int a = ( int ) Math.max( 0, Math.min( 255, Util.round( getA() * 255 ) ) );
final int r = ( int ) Math.max( 0, Math.min( 255, Util.round( getR() * 255 ) ) );
final int g = ( int ) Math.max( 0, Math.min( 255, Util.round( getG() * 255 ) ) );
final int b = ( int ) Math.max( 0, Math.min( 255, Util.round( getB() * 255 ) ) );
return ( ( ( ( ( a << 8 ) | r ) << 8 ) | g ) << 8 ) | b;
}
代码示例来源:origin: imglib/imglib2
@Override
public void setReal( final double real )
{
setInteger( Util.round( real ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
set( ( int ) Util.round( get() * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
final short a = getShort();
setShort( ( short ) Util.round( a * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final float c )
{
final byte a = getByte();
setByte( ( byte ) Util.round( a * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
set( Util.round( ( get() * c ) ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final float c )
{
final short a = getShort();
setShort( ( short ) Util.round( a * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
setLong( Util.round( getLong() * c ) );
}
代码示例来源:origin: imglib/imglib2
@Override
public void mul( final float c )
{
final short a = getShort();
setShort( ( short ) Util.round( a * c ) );
}
代码示例来源:origin: imglib/imglib2
@Override
public void mul( final float c )
{
set( Util.round( ( double ) ( get() * c ) ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final float c )
{
set( Util.round( ( double ) ( get() * c ) ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
final int a = getInt();
setInt( ( int ) Util.round( a * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
final byte a = getByte();
setByte( ( byte ) Util.round( a * c ) );
}
代码示例来源:origin: imglib/imglib2
@Override
public void mul( final double c )
{
setLong( Util.round( getLong() * c ) );
}
代码示例来源:origin: imglib/imglib2
@Override
public void mul( final double c )
{
final int a = getInt();
setInt( ( int ) Util.round( a * c ) );
}
代码示例来源:origin: imglib/imglib2
@Override
public void mul( final double c )
{
final short a = getShort();
setShort( ( short ) Util.round( a * c ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final double c )
{
final long a = getUnsignedInt( getInt() );
setInt( getCodedSignedInt( ( int ) Util.round( a * c ) ) );
}
代码示例来源:origin: net.imglib2/imglib2
@Override
public void mul( final float c )
{
final long a = getUnsignedInt( getInt() );
setInt( getCodedSignedInt( Util.round( a * c ) ) );
}
内容来源于网络,如有侵权,请联系作者删除!