mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-08-29 00:49:34 +02:00
Fix clipboard scroll with 1 entry
This commit is contained in:
parent
c325f0745c
commit
e7e833789a
|
@ -44,9 +44,12 @@ public class MathMan {
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final int wrap(int value, int min, int max) {
|
public static final int wrap(int value, int min, int max) {
|
||||||
if (max <= min) {
|
if (max < min) {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
if (min == max) {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
int diff = max - min + 1;
|
int diff = max - min + 1;
|
||||||
if (value < min) {
|
if (value < min) {
|
||||||
return max - ((min - value) % diff);
|
return max - ((min - value) % diff);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user