Interface TrapezoidFloat
- All Superinterfaces:
Comparable<ValueProvider>, FloatProvider, ValueProvider, Wrapper
A trapezoid float provider: a random value with an isosceles trapezoidal distribution.
The
plateau() is the length of the range in the middle that has a uniform
distribution; a plateau of 0 yields a triangular distribution.- Since:
- 3.0.0
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface FloatProvider
FloatProvider.FloatProviderBuilder<T,S> -
Method Summary
Modifier and TypeMethodDescriptionstatic TrapezoidFloat.Builderbuilder()Creates a new builder.static TrapezoidFloatof(float min, float max, float plateau) Creates a new trapezoid float provider.floatplateau()The length of the range in the middle that has a uniform distribution.default TrapezoidFloat.BuilderConverts this object back to a builder.Methods inherited from interface FloatProvider
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 float provider.- Parameters:
min- the minimum valuemax- the maximum valueplateau- the range in the middle that has a uniform distribution- Returns:
- the trapezoid float provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-