MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / range

Method range

src/main/java/wycc/util/ArrayUtils.java:38–48  ·  view source on GitHub ↗

Return an integer array containing consecutive integers from a given start value upto (but not including) a given end value. @param start The start value from which the range begins. This value is always the first element of the final array (assuming it's not empty)

(int start, int end)

Source from the content-addressed store, hash-verified

36 * @return
37 */
38 public static int[] range(int start, int end) {
39 if (end <= start) {
40 return new int[0];
41 } else {
42 int[] rs = new int[Math.abs(end - start)];
43 for (int i = start; i < end; ++i) {
44 rs[i - start] = i;
45 }
46 return rs;
47 }
48 }
49
50 /**
51 * Append two arrays of boolean type together, producing a fresh array whose

Callers 1

topMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected