Here you can find the source of toFloats(String floatArray)
Parameter | Description |
---|---|
floatArray | a parameter |
public static float[] toFloats(String floatArray)
//package com.java2s; /**/*from w ww . j a v a 2 s . com*/ * <p>This class contains utility tools for all common or proprietary * assembling classes.</p> * * <p>This source is free; you can redistribute it and/or modify it under * the terms of the GNU General Public License and by nameing of the originally author</p> * * @author Markus Zimmermann <a href="http://www.die-seite.ch">http://www.die-seite.ch</a> * @version 3.1 */ public class Main { /** * converts float values from string separated by * " " (space) to an Array of floats * @param floatArray * @return */ public static float[] toFloats(String floatArray) { String[] s = floatArray.split(" "); float[] f = new float[s.length]; for (int i = 0; i < f.length; i++) { f[i] = Float.parseFloat(s[i]); } return f; } }