MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / normalizeValue

Method normalizeValue

Minecraft-Utils/1.8.9/src/Slider.java:71–73  ·  view source on GitHub ↗
(float value)

Source from the content-addressed store, hash-verified

69 }
70
71 public float normalizeValue(float value) {
72 return Utils.clamp((snapToStepClamp(value) - sliderItem.getMinValue()) / (sliderItem.getMaxValue() - sliderItem.getMinValue()), 0.0F, 1.0F);
73 }
74
75 public float snapToStepClamp(float value) {
76 value = snapToStep(value);

Callers 3

SliderMethod · 0.95
setLabelMethod · 0.95
bMethod · 0.95

Calls 4

clampMethod · 0.95
snapToStepClampMethod · 0.95
getMinValueMethod · 0.65
getMaxValueMethod · 0.65

Tested by

no test coverage detected