RoundingMode.HALF_DOWN

Rounding mode to round towards {@literal "nearest neighbor"} unless both neighbors are equidistant, in which case round down. Behaves as for {@code RoundingMode.UP} if the discarded fraction is > 0.5; otherwise, behaves as for {@code RoundingMode.DOWN}.

<p>Example: <table border> <caption><b>Rounding mode HALF_DOWN Examples</b></caption> <tr valign=top><th>Input Number</th> <th>Input rounded to one digit<br> with {@code HALF_DOWN} rounding <tr align=right><td>5.5</td> <td>5</td> <tr align=right><td>2.5</td> <td>2</td> <tr align=right><td>1.6</td> <td>2</td> <tr align=right><td>1.1</td> <td>1</td> <tr align=right><td>1.0</td> <td>1</td> <tr align=right><td>-1.0</td> <td>-1</td> <tr align=right><td>-1.1</td> <td>-1</td> <tr align=right><td>-1.6</td> <td>-2</td> <tr align=right><td>-2.5</td> <td>-2</td> <tr align=right><td>-5.5</td> <td>-5</td> </table>

class RoundingMode
static
RoundingMode HALF_DOWN;

Meta