8233650: Javadoc for Math.floorMod(int, int) gives wrong example

Reviewed-by: bpb
This commit is contained in:
Ivan Gerasimov 2019-11-05 20:27:21 -08:00
parent 8ca82e3147
commit 1c2b406ab5

View file

@ -1259,16 +1259,17 @@ public final class Math {
* Examples:
* <ul>
* <li>If the signs of the arguments are the same, the results
* of {@code floorMod} and the {@code %} operator are the same. <br>
* of {@code floorMod} and the {@code %} operator are the same.<br>
* <ul>
* <li>{@code floorMod(4, 3) == 1}; &nbsp; and {@code (4 % 3) == 1}</li>
* <li>{@code floorMod(+4, +3) == +1}; &nbsp; and {@code (+4 % +3) == +1}</li>
* <li>{@code floorMod(-4, -3) == -1}; &nbsp; and {@code (-4 % -3) == -1}</li>
* </ul>
* <li>If the signs of the arguments are different, the results
* differ from the {@code %} operator.<br>
* <ul>
* <li>{@code floorMod(+4, -3) == -2}; &nbsp; and {@code (+4 % -3) == +1}</li>
* <li>{@code floorMod(-4, +3) == +2}; &nbsp; and {@code (-4 % +3) == -1}</li>
* </ul>
* <li>If the signs of the arguments are different, the results differ from the {@code %} operator.<br>
* <ul>
* <li>{@code floorMod(+4, -3) == -2}; &nbsp; and {@code (+4 % -3) == +1} </li>
* <li>{@code floorMod(-4, +3) == +2}; &nbsp; and {@code (-4 % +3) == -1} </li>
* <li>{@code floorMod(-4, -3) == -1}; &nbsp; and {@code (-4 % -3) == -1 } </li>
* </ul>
* </li>
* </ul>
* <p>