Added append(float[],float).

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1878 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-07-21 18:52:05 +00:00
parent 1805b5b9e3
commit 1a8da5bf2d
@@ -755,6 +755,18 @@ public class ArrayUtil
return nvalues;
}
/**
* Creates a new array one larger than the supplied array and with the
* specified value inserted into the last slot.
*/
public static float[] append (float[] values, float value)
{
float[] nvalues = new float[values.length+1];
System.arraycopy(values, 0, nvalues, 0, values.length);
nvalues[values.length] = value;
return nvalues;
}
/**
* Creates a new array one larger than the supplied array and with the
* specified value inserted into the last slot. The type of the values