Interface ClampedNormalInt
- All Superinterfaces:
Comparable<ValueProvider>, IntProvider, ValueProvider, Wrapper
Clamped normal samples a bell curve centered at mean with spread deviation,
then forces the result into [
IntProvider.minInclusive(), IntProvider.maxInclusive()].
Anything outside gets snapped to the nearest bound rather than rerolled.- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface IntProvider
IntProvider.IntProviderBuilder<T,S> -
Method Summary
Modifier and TypeMethodDescriptionstatic ClampedNormalInt.Builderbuilder()Creates a new builder.floatThe deviation of the normal distribution.floatmean()The mean of the normal distribution.static ClampedNormalIntof(int min, int max, float mean, float deviation) Creates a new ClampedNormalInt.default ClampedNormalInt.BuilderConverts this object back to a builder.Methods inherited from interface IntProvider
clamp, max, maxInclusive, min, minInclusiveMethods inherited from interface ValueProvider
compareToMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
mean
The mean of the normal distribution.- Returns:
- the mean of the normal distribution
- Since:
- 3.0.0
-
deviation
The deviation of the normal distribution.- Returns:
- the deviation of the normal distribution
- Since:
- 3.0.0
-
toBuilder
Converts this object back to a builder.- Returns:
- a builder with the same values as this object
- Since:
- 3.0.0
-
of
Creates a new ClampedNormalInt.- Parameters:
min- the minimum valuemax- the maximum valuemean- the mean of the normal distributiondeviation- the deviation of the normal distribution- Returns:
- the ClampedNormalInt
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-