MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / trimArray

Method trimArray

ij/src/main/java/ij/macro/Functions.java:6515–6526  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6513 }
6514
6515 Variable[] trimArray() {
6516 interp.getLeftParen();
6517 Variable[] a1 = getArray();
6518 int len = a1.length;
6519 int size = (int)getLastArg();
6520 if (size<0) size = 0;
6521 if (size>len) size = len;
6522 Variable[] a2 = new Variable[size];
6523 for (int i=0; i<size; i++)
6524 a2[i] = (Variable)a1[i].clone();
6525 return a2;
6526 }
6527
6528 Variable[] sortArray() {
6529 interp.getLeftParen();

Callers 1

doArrayMethod · 0.95

Calls 4

getArrayMethod · 0.95
getLastArgMethod · 0.95
getLeftParenMethod · 0.80
cloneMethod · 0.65

Tested by

no test coverage detected