java.lang.Object
com.hypixel.hytale.builtin.hytalegenerator.framework.math.InterpolatedCurve
All Implemented Interfaces:
it.unimi.dsi.fastutil.doubles.Double2DoubleFunction, it.unimi.dsi.fastutil.Function<Double,Double>, DoubleUnaryOperator, Function<Double,Double>

public class InterpolatedCurve extends Object implements it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
     
    private final it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
     
    private final it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
     
    private final double
     
    private final double
     
    private final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    InterpolatedCurve(double positionA, double positionB, double smoothTransition, it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionA, it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionB)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(double x)
     
    double
    transitionCurve(double ratio)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface it.unimi.dsi.fastutil.doubles.Double2DoubleFunction

    andThen, andThenByte, andThenChar, andThenDouble, andThenFloat, andThenInt, andThenLong, andThenObject, andThenReference, andThenShort, applyAsDouble, compose, composeByte, composeChar, composeDouble, composeFloat, composeInt, composeLong, composeObject, composeReference, composeShort, containsKey, containsKey, defaultReturnValue, defaultReturnValue, get, getOrDefault, getOrDefault, put, put, remove, remove

    Methods inherited from interface java.util.function.DoubleUnaryOperator

    andThen, compose

    Methods inherited from interface it.unimi.dsi.fastutil.Function

    apply, clear, size
  • Field Details

    • functionA

      @Nonnull private final it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionA
    • functionB

      @Nonnull private final it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionB
    • positionA

      private final double positionA
    • positionB

      private final double positionB
    • distance

      private final double distance
    • smoothTransition

      private final double smoothTransition
  • Constructor Details

    • InterpolatedCurve

      public InterpolatedCurve(double positionA, double positionB, double smoothTransition, @Nonnull it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionA, @Nonnull it.unimi.dsi.fastutil.doubles.Double2DoubleFunction functionB)
  • Method Details

    • get

      public double get(double x)
      Specified by:
      get in interface it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
    • transitionCurve

      public double transitionCurve(double ratio)