Factions/src/com/massivecraft/factions/util/MiscUtil.java

26 lines
403 B
Java
Raw Normal View History

2011-07-18 22:06:02 +02:00
package com.massivecraft.factions.util;
2011-04-08 21:01:46 +02:00
public class MiscUtil {
// Inclusive range
public static long[] range(long start, long end) {
long[] values = new long[(int) Math.abs(end - start) + 1];
if (end < start) {
long oldstart = start;
start = end;
end = oldstart;
}
for (long i = start; i <= end; i++) {
values[(int) (i - start)] = i;
}
return values;
}
}