List of utility methods to do Float Array Convert
String | floatArray2Json(float[] array) float Array Json if (array.length == 0) return "[]"; StringBuilder sb = new StringBuilder(array.length << 4); sb.append('['); for (float o : array) { sb.append(Float.toString(o)); sb.append(','); sb.setCharAt(sb.length() - 1, ']'); return sb.toString(); |
float[] | floatArrayPlusFloat(float[] xs, float y) float Array Plus Float float[] r = new float[xs.length]; for (int i = 0; i < xs.length; ++i) { r[i] = xs[i] + y; return r; |
double[] | floatArrayToDouble(float[] from) float Array To Double double[] to = new double[from.length]; for (int i = 0; i < from.length; i++) { to[i] = (double) from[i]; return to; |