MCPcopy Create free account
hub / github.com/demoth/jake2 / ClampCvar

Method ClampCvar

client/src/main/java/jake2/client/Menu.java:1260–1266  ·  view source on GitHub ↗
(float min, float max, float value)

Source from the content-addressed store, hash-verified

1258 }
1259
1260 private static float ClampCvar(float min, float max, float value) {
1261 if (value < min)
1262 return min;
1263 if (value > max)
1264 return max;
1265 return value;
1266 }
1267
1268 private static void ControlsSetMenuItemValues() {
1269 s_options_sfxvolume_slider.curvalue = Cvar.getInstance().VariableValue("s_volume") * 10;

Callers 2

StartServerActionFuncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected