MCPcopy Index your code
hub / github.com/processing/processing / getMaxFloat

Method getMaxFloat

core/src/processing/data/Table.java:4717–4734  ·  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

4715 * Returns missing float (Float.NaN by default) if no valid numbers found.
4716 */
4717 protected float getMaxFloat() {
4718 boolean found = false;
4719 float max = PConstants.MIN_FLOAT;
4720 for (int row = 0; row < getRowCount(); row++) {
4721 for (int col = 0; col < getColumnCount(); col++) {
4722 float value = getFloat(row, col);
4723 if (!Float.isNaN(value)) { // TODO no, this should be comparing to the missing value
4724 if (!found) {
4725 max = value;
4726 found = true;
4727 } else if (value > max) {
4728 max = value;
4729 }
4730 }
4731 }
4732 }
4733 return found ? max : missingFloat;
4734 }
4735
4736
4737 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Callers

nothing calls this directly

Calls 3

getRowCountMethod · 0.95
getColumnCountMethod · 0.95
getFloatMethod · 0.95

Tested by

no test coverage detected