Mojira Archive
MC-170676

Scoreboard modulo gives incorrect results with negatives

At some point it appears that the division type was changed for modulo and now gives different results.

Operations such as:
 -5 %= 4 should result in -1, but now results in 3

Steps to reproduce:
1. Create scoreboard "name"
2. Add target player "x" with negative score eg. -5 and selector player "y" with a positive score eg. 4
3. /scoreboard players operation "x" "name" %= "y" "name"

the result is 3 when it should be -1

Works As Intended

MukiTanuki

2020-02-02, 12:19 AM

2020-02-02, 10:19 PM

2020-02-02, 10:19 PM

0

1

Unconfirmed

(Unassigned)

1.15.2

-