Java tutorial
//package com.java2s; public class Main { /** * Expands an array of floats to double its current size. * * @param f Array to be expanded. * @return Array of floats with f.length*2 length. */ static public float[] resizeArrayFloat(float[] f, int newSize) { float[] newf = new float[newSize]; System.arraycopy(f, 0, newf, 0, Math.min(f.length, newSize)); return newf; } public static float min(float[] f) { float min = Float.MAX_VALUE; for (float ff : f) if (ff < min) min = ff; return min; } }