mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8233650
: Javadoc for Math.floorMod(int, int) gives wrong example
Reviewed-by: bpb
This commit is contained in:
parent
8ca82e3147
commit
1c2b406ab5
1 changed files with 9 additions and 8 deletions
|
@ -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}; and {@code (4 % 3) == 1}</li>
|
||||
* <li>{@code floorMod(+4, +3) == +1}; and {@code (+4 % +3) == +1}</li>
|
||||
* <li>{@code floorMod(-4, -3) == -1}; 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}; and {@code (+4 % -3) == +1}</li>
|
||||
* <li>{@code floorMod(-4, +3) == +2}; 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}; and {@code (+4 % -3) == +1} </li>
|
||||
* <li>{@code floorMod(-4, +3) == +2}; and {@code (-4 % +3) == -1} </li>
|
||||
* <li>{@code floorMod(-4, -3) == -1}; and {@code (-4 % -3) == -1 } </li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* </ul>
|
||||
* <p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue