Reuse method from "MathArrays".

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1604641 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gilles Sadowski 2014-06-22 19:07:55 +00:00
parent 71fd124ddb
commit f08b05b15a
1 changed files with 1 additions and 4 deletions

View File

@ -486,10 +486,7 @@ public class Percentile extends AbstractUnivariateStatistic implements Serializa
*/
private static double[] copyOf(final double[] values, final int begin, final int length) {
MathArrays.verifyValues(values, begin, length);
final double[] copy = new double[length];
System.arraycopy(values, begin, copy, 0,
FastMath.min(length, values.length));
return copy;
return MathArrays.copyOfRange(values, begin, begin + length);
}
/**