Interface UniformFloat
- All Superinterfaces:
Comparable<ValueProvider>, FloatProvider, ValueProvider, Wrapper
Uniform float providers sample a range between
FloatProvider.minInclusive() (inclusive)
and maxExclusive() (exclusive), returning a single, uniformly random value.
Note the upper bound is exclusive here, unlike the int provider family.- 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 UniformFloat.Builderbuilder()Creates a new builder.floatThe exclusive upper bound of the range.default floatThe largest value this provider can yield.static UniformFloatof(float min, float max) Creates a new uniform float provider.default UniformFloat.BuilderConverts this object back to a builder.Methods inherited from interface FloatProvider
max, min, minInclusiveMethods inherited from interface ValueProvider
compareToMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
maxExclusive
The exclusive upper bound of the range.- Returns:
- the exclusive upper bound
- Since:
- 3.0.0
-
maxInclusive
Description copied from interface:FloatProviderThe largest value this provider can yield.- Specified by:
maxInclusivein interfaceFloatProvider- Returns:
- the largest value this provider can yield.
-
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 uniform float provider.- Parameters:
min- the minimum value (inclusive)max- the maximum value (exclusive)- Returns:
- the uniform float provider
- Since:
- 3.0.0
-
builder
Creates a new builder.- Returns:
- a new builder
- Since:
- 3.0.0
-