Interface TrapezoidInt
- All Superinterfaces:
Comparable<ValueProvider>, IntProvider, ValueProvider, Wrapper
A trapezoid int provider.
- Since:
- 3.0.0
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface IntProvider
IntProvider.IntProviderBuilder<T,S> -
Method Summary
Modifier and TypeMethodDescriptionstatic TrapezoidInt.Builderbuilder()Creates a new builder.static TrapezoidIntof(int min, int max, int plateau) Creates a new trapezoid int provider.intplateau()The length of the range in the middle that has a uniform distribution.default TrapezoidInt.BuilderConverts this object back to a builder.static TrapezoidInttriangle(int range) A symmetric triangular distribution over [-IntProvider.minInclusive(),IntProvider.maxInclusive()].Methods inherited from interface IntProvider
clamp, max, maxInclusive, min, minInclusiveMethods inherited from interface ValueProvider
compareToMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
plateau
The length of the range in the middle that has a uniform distribution.- Returns:
- the plateau
- 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 trapezoid int provider.- Parameters:
min- min inclusivemax- max inclusiveplateau- the length of the range in the middle that has a uniform distribution- Returns:
- the trapezoid int provider
- Since:
- 3.0.0
-
triangle
A symmetric triangular distribution over [-IntProvider.minInclusive(),IntProvider.maxInclusive()].- Parameters:
range- the range of the triangular distribution- Returns:
- the trapezoid int provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-