MCPcopy Index your code
hub / github.com/benfry/processing4 / getMaxFloat

Method getMaxFloat

core/src/processing/data/Table.java:4816–4833  ·  view source on GitHub ↗

Searches the entire table for float values. Returns missing float (Float.NaN by default) if no valid numbers found.

()

Source from the content-addressed store, hash-verified

4814 * Returns missing float (Float.NaN by default) if no valid numbers found.
4815 */
4816 protected float getMaxFloat() {
4817 boolean found = false;
4818 float max = PConstants.MIN_FLOAT;
4819 for (int row = 0; row < getRowCount(); row++) {
4820 for (int col = 0; col < getColumnCount(); col++) {
4821 float value = getFloat(row, col);
4822 if (!Float.isNaN(value)) { // TODO no, this should be comparing to the missing value
4823 if (!found) {
4824 max = value;
4825 found = true;
4826 } else if (value > max) {
4827 max = value;
4828 }
4829 }
4830 }
4831 }
4832 return found ? max : missingFloat;
4833 }
4834
4835
4836 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers

nothing calls this directly

Calls 3

getRowCountMethod · 0.95
getColumnCountMethod · 0.95
getFloatMethod · 0.95

Tested by

no test coverage detected