Skip to content

Commit

Permalink
Update MathUtil.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mcchampions committed Dec 13, 2024
1 parent 8747177 commit dd48c1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/city/norain/slimefun4/utils/MathUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public class MathUtil {
public static int saturatedAdd(int x, int y) {
int r = x + y;
if (((r ^ x) & (r ^ y)) < 0) {
return x < 0 ? Integer.MIN_VALUE : Integer.MAX_VALUE;
return x < 0 ? 0x80000000 : 0x7fffffff;
} else {
return r;
}
Expand Down

0 comments on commit dd48c1a

Please sign in to comment.