Get a float value from the specified row and column. If the value is null or not parseable as a float, the "missing" value is returned. By default, this is Float.NaN, but can be controlled with setMissingFloat(). @webref table:method @brief Get a float value from the specified row and column @param
(int row, int column)
| 3241 | * @see Table#setString(int, int, String) |
| 3242 | */ |
| 3243 | public float getFloat(int row, int column) { |
| 3244 | checkBounds(row, column); |
| 3245 | if (columnTypes[column] == FLOAT) { |
| 3246 | float[] floatData = (float[]) columns[column]; |
| 3247 | return floatData[row]; |
| 3248 | } |
| 3249 | String str = getString(row, column); |
| 3250 | if (str == null || str.equals(missingString)) { |
| 3251 | return missingFloat; |
| 3252 | } |
| 3253 | return PApplet.parseFloat(str, missingFloat); |
| 3254 | } |
| 3255 | |
| 3256 | /** |
| 3257 | * @param columnName title of the column to reference |
no test coverage detected