Interface YClampedGradient

All Superinterfaces:
DensityFunction, Keyed, Registerable<YClampedGradient>, Wrapper

@NullMarked @AsOf("3.0.0") public interface YClampedGradient extends DensityFunction, Registerable<YClampedGradient>
Clamps the Y coordinate between fromY and toY and then linearly maps it to the range [fromValue, toValue].
Since:
3.0.0
See Also:
  • Method Details

    • fromY

      @AsOf("3.0.0") int fromY()
      The Y coordinate that maps to fromValue().
      Returns:
      the lower Y coordinate
      Since:
      3.0.0
    • toY

      @AsOf("3.0.0") int toY()
      The Y coordinate that maps to toValue().
      Returns:
      the upper Y coordinate
      Since:
      3.0.0
    • fromValue

      @AsOf("3.0.0") double fromValue()
      The value that fromY() maps to.
      Returns:
      the lower value
      Since:
      3.0.0
    • toValue

      @AsOf("3.0.0") double toValue()
      The value that toY() maps to.
      Returns:
      the upper value
      Since:
      3.0.0
    • toBuilder

      @AsOf("3.0.0") default YClampedGradient.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 YClampedGradient of(@Nullable ResourceKey resourceKey, int fromY, int toY, double fromValue, double toValue)
      Creates a new y clamped gradient density function.
      Parameters:
      resourceKey - the resource key, or null
      fromY - the Y coordinate that maps to fromValue
      toY - the Y coordinate that maps to toValue
      fromValue - the value that fromY maps to
      toValue - the value that toY maps to
      Returns:
      a new y clamped gradient density function
      Since:
      3.0.0
    • of

      @AsOf("3.0.0") static YClampedGradient of(int fromY, int toY, double fromValue, double toValue)
      Creates a new y clamped gradient density function.
      Parameters:
      fromY - the Y coordinate that maps to fromValue
      toY - the Y coordinate that maps to toValue
      fromValue - the value that fromY maps to
      toValue - the value that toY maps to
      Returns:
      a new y clamped gradient density function
      Since:
      3.0.0
    • builder

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