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

Method snapToStepClamp

Minecraft-Utils/1.12/src/Slider.java:75–78  ·  view source on GitHub ↗
(float value)

Source from the content-addressed store, hash-verified

73 }
74
75 public float snapToStepClamp(float value) {
76 value = snapToStep(value);
77 return Utils.clamp(value, sliderItem.getMinValue(), sliderItem.getMaxValue());
78 }
79
80 protected float snapToStep(float value) {
81 if (sliderItem.getSteps() != -1) {

Callers 2

denormalizeValueMethod · 0.95
normalizeValueMethod · 0.95

Calls 4

snapToStepMethod · 0.95
clampMethod · 0.95
getMinValueMethod · 0.65
getMaxValueMethod · 0.65

Tested by

no test coverage detected