public static <T> Collector<T, ?, List<T>> lastN(int n) {
        return Collector.<T, Deque<T>, List<T>>of(ArrayDeque::new, (acc, t) -> {
            if(acc.size() == n)
                acc.pollFirst();
            acc.add(t);
        }, (acc1, acc2) -> {
            while(acc2.size() < n && !acc1.isEmpty()) {
                acc2.addFirst(acc1.pollLast());
            }
            return acc2;
        }, ArrayList::new);
    }
Returns a "niceScaling" number approximately equal to the range.
Rounds the number if ROUND == true.
Takes the ceiling if ROUND = false.

@param RANGE the value range (maxValue - minValue)
@param ROUND whether to round the result or ceil
@return a "niceScaling" number to be used for the value range
src/main/java/eu/hansolo/tilesfx/tools/Helper.java