Record Class CubicSpline.Multipoint<C,I extends ToFloatFunction<C>>

java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Multipoint<C,I>
All Implemented Interfaces:
CubicSpline<C,I>, ToFloatFunction<C>
Enclosing interface:
CubicSpline<C,I extends ToFloatFunction<C>>

public static record CubicSpline.Multipoint<C,I extends ToFloatFunction<C>>(I extends ToFloatFunction<C> coordinate, float[] locations, List<CubicSpline<C,I extends ToFloatFunction<C>>> values, float[] derivatives, float minValue, float maxValue) extends Record implements CubicSpline<C,I>
  • Field Details

    • coordinate

      private final I extends ToFloatFunction<C> coordinate
      The field for the coordinate record component.
    • locations

      private final float[] locations
      The field for the locations record component.
    • values

      private final List<CubicSpline<C,I extends ToFloatFunction<C>>> values
      The field for the values record component.
    • derivatives

      private final float[] derivatives
      The field for the derivatives record component.
    • minValue

      private final float minValue
      The field for the minValue record component.
    • maxValue

      private final float maxValue
      The field for the maxValue record component.
  • Constructor Details

    • Multipoint

      public Multipoint(I coordinate, float[] locations, List<CubicSpline<C,I>> values, float[] derivatives, float minValue, float maxValue)
      Creates an instance of a Multipoint record class.
      Parameters:
      coordinate - the value for the coordinate record component
      locations - the value for the locations record component
      values - the value for the values record component
      derivatives - the value for the derivatives record component
      minValue - the value for the minValue record component
      maxValue - the value for the maxValue record component
  • Method Details

    • create

      static <C, I extends ToFloatFunction<C>> CubicSpline.Multipoint<C,I> create(I p_216144_, float[] p_216145_, List<CubicSpline<C,I>> p_216146_, float[] p_216147_)
    • linearExtend

      private static float linearExtend(float p_216134_, float[] p_216135_, float p_216136_, float[] p_216137_, int p_216138_)
    • validateSizes

      private static <C, I extends ToFloatFunction<C>> void validateSizes(float[] p_216152_, List<CubicSpline<C,I>> p_216153_, float[] p_216154_)
    • apply

      public float apply(C p_184340_)
      Specified by:
      apply in interface ToFloatFunction<C>
    • findIntervalStart

      private static int findIntervalStart(float[] p_216149_, float p_216150_)
    • parityString

      public String parityString()
      Specified by:
      parityString in interface CubicSpline<C,I extends ToFloatFunction<C>>
    • toString

      private String toString(float[] p_184335_)
    • mapAll

      public CubicSpline<C,I> mapAll(CubicSpline.CoordinateVisitor<I> p_211585_)
      Specified by:
      mapAll in interface CubicSpline<C,I extends ToFloatFunction<C>>
    • minValue

      public float minValue()
      Returns the value of the minValue record component.
      Specified by:
      minValue in interface ToFloatFunction<C>
      Returns:
      the value of the minValue record component
    • maxValue

      public float maxValue()
      Returns the value of the maxValue record component.
      Specified by:
      maxValue in interface ToFloatFunction<C>
      Returns:
      the value of the maxValue record component
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • coordinate

      public I coordinate()
      Returns the value of the coordinate record component.
      Returns:
      the value of the coordinate record component
    • locations

      public float[] locations()
      Returns the value of the locations record component.
      Returns:
      the value of the locations record component
    • values

      public List<CubicSpline<C,I>> values()
      Returns the value of the values record component.
      Returns:
      the value of the values record component
    • derivatives

      public float[] derivatives()
      Returns the value of the derivatives record component.
      Returns:
      the value of the derivatives record component