Package johnsmith.enchantmentcore.api.enchantment.spellfield.math.function
package johnsmith.enchantmentcore.api.enchantment.spellfield.math.function
-
Record ClassesClassDescriptionA
DistanceScalingFunctionthat returns a uniform constant multiplier regardless of distance (f(d) = value).ADistanceScalingFunctionthat attenuates effect intensity exponentially with normalized distance:
f(d, R) = e-λ · (d / R)
where λ isExponentialScalingFunction.decayRate().ADistanceScalingFunctionthat attenuates effect intensity linearly from 1.0 at the origin to 0.0 atmaxRadius:
f(d, R) = max(0, 1 - (d / R))ADistanceScalingFunctionthat attenuates effect intensity along a normalized logarithmic curve:
f(d, R) = max(0, 1 - ln(1 + k · (d / R)) / ln(1 + k))
where k isLogarithmicScalingFunction.steepness().ADistanceScalingFunctionthat attenuates effect intensity according to a power curve of normalized distance:
f(d, R) = max(0, 1 - (d / R)p)
where p isPolynomialScalingFunction.degree().ADistanceScalingFunctionthat attenuates effect intensity along a logistic S-curve:
f(d, R) = 1 / (1 + ek · (d - m · R))
where k isSigmoidScalingFunction.steepness()and m isSigmoidScalingFunction.midpointRatio().