MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / readFloat

Method readFloat

src/main/java/net/optifine/util/FontUtils.java:79–101  ·  view source on GitHub ↗
(Properties props, String key, float defOffset)

Source from the content-addressed store, hash-verified

77 }
78
79 public static float readFloat(Properties props, String key, float defOffset)
80 {
81 String s = props.getProperty(key);
82
83 if (s == null)
84 {
85 return defOffset;
86 }
87 else
88 {
89 float f = Config.parseFloat(s, Float.MIN_VALUE);
90
91 if (f == Float.MIN_VALUE)
92 {
93 Config.warn("Invalid value for " + key + ": " + s);
94 return defOffset;
95 }
96 else
97 {
98 return f;
99 }
100 }
101 }
102
103 public static boolean readBoolean(Properties props, String key, boolean defVal)
104 {

Callers 1

readFontTextureMethod · 0.95

Calls 3

parseFloatMethod · 0.95
warnMethod · 0.95
getPropertyMethod · 0.45

Tested by

no test coverage detected