Interface ClampedNormalFloat

All Superinterfaces:
Comparable<ValueProvider>, FloatProvider, ValueProvider, Wrapper

@NullMarked @AsOf("3.0.0") public interface ClampedNormalFloat extends FloatProvider
Clamped normal samples a bell curve centered at mean with spread deviation, then forces the result into [FloatProvider.minInclusive(), FloatProvider.maxInclusive()]. Anything outside gets snapped to the nearest bound rather than rerolled.
Since:
3.0.0
See Also:
  • Method Details

    • mean

      @AsOf("3.0.0") float mean()
      The mean of the normal distribution.
      Returns:
      the mean of the normal distribution
      Since:
      3.0.0
    • deviation

      @AsOf("3.0.0") float deviation()
      The deviation of the normal distribution.
      Returns:
      the deviation of the normal distribution
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default ClampedNormalFloat.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static ClampedNormalFloat of(float min, float max, float mean, float deviation)
      Creates a new ClampedNormalFloat.
      Parameters:
      min - the minimum value to clamp to
      max - the maximum value to clamp to
      mean - the mean of the normal distribution
      deviation - the deviation of the normal distribution
      Returns:
      the ClampedNormalFloat
      Since:
      3.0.0
    • builder

      @AsOf("3.0.0") static ClampedNormalFloat.Builder builder()
      Creates a new builder.
      Returns:
      a new builder
      Since:
      3.0.0