static short[] doubleToShortArray_iround(double[] a, int start, int end) { short[] b = new[end-start]; for (int i = start; i < end; i++) b[i-start] = clampToShort(iround(a[i])); ret b; } static short[] doubleToShortArray_iround(double[] a) { ret a == null ?: doubleToShortArray_iround(a, 0, a.length); }