So I am trying to calculate my average goals blocked by dividing how many I stopped by how many shots have been taken. How can I stop it from rounding my average
counter = goals blocked goalCounter = goals scored
avg.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
BigDecimal avgCalc = new BigDecimal(counter/goalCounter);
tvDisplayAvg.setText("Goal Avg: " + avgCalc);
}
});
So I got it to divide and get decimals but is there a way to set a limit of only dividing to the thousandths place?