我试图在以下MathContext中添加更多代码
private static MathContext mc = new MathContext( 12, RoundingMode.HALF_EVEN );
这是我试图在上下文中添加的代码
footToMeter = footToMeter.multiply(METER_TO_INTL_FOOT_FACTOR);
if(footToMeter.signum() >= 0.07)
{
return footToMeter =METER_TO_INTL_FOOT_FACTOR.setScale(12,RoundingMode.UP);
}
else if(footToMeter.signum() < 0.07);
{
return footToMeter = footToMeter.setScale(12, RoundingMode.DOWN);
}
}
我希望在MathContext中拥有舍入功能。