MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / getFloat

Method getFloat

src/main/java/field/utility/Dict.java:473–482  ·  view source on GitHub ↗
(Prop<? extends Number> n, float def)

Source from the content-addressed store, hash-verified

471 }
472
473 public float getFloat(Prop<? extends Number> n, float def) {
474 Object x = get(n);
475 if (x instanceof Float[]) return ((Float[]) x)[0].floatValue();
476 if (x instanceof Boolean) return ((Boolean) x).booleanValue() ? 1 : 0f;
477 if (x instanceof float[]) return ((float[]) x)[0];
478
479 Number gotten = (Number) x;
480 if (gotten != null) return gotten.floatValue();
481 return def;
482 }
483
484
485 public Dict duplicate() {

Callers 15

multiplyMethod · 0.95
transformPart1Method · 0.80
feedbackMethod · 0.80
defaultdrawsLinesMethod · 0.80
projectFLineToAreaMethod · 0.80
dispatchMethod · 0.80
loadedMethod · 0.80
StatusBarMethod · 0.80
defaultdrawsLinesMethod · 0.80
updateFrameToMiddleMethod · 0.80
DispatchMethod · 0.80
showIncompleteDragMethod · 0.80

Calls 1

getMethod · 0.95

Tested by

no test coverage detected