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

Method denormalizeValue

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

Source from the content-addressed store, hash-verified

65 }
66
67 public float denormalizeValue(float value) {
68 return this.snapToStepClamp(sliderItem.getMinValue() + (sliderItem.getMaxValue() - sliderItem.getMinValue()) * Utils.clamp(value, 0.0F, 1.0F));
69 }
70
71 public float normalizeValue(float value) {
72 return Utils.clamp((snapToStepClamp(value) - sliderItem.getMinValue()) / (sliderItem.getMaxValue() - sliderItem.getMinValue()), 0.0F, 1.0F);

Callers 1

aMethod · 0.95

Calls 4

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

Tested by

no test coverage detected