I have the following code:
LocalTime time = LocalTime.now();
BigDecimal res = new BigDecimal(time.getMinute()).divide(new BigDecimal(60), 4, RoundingMode.HALF_UP);
and I want the following results to occur:
55/60 = 0.9167
17/60 = 0.2833
I am wondering what type of rounding I should use for these results. At the moment I am using RoundingMode.HALF_UP
but I'm unsure whether this is the right mode to be using in order to get these results.