Class NodeFunction

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

public class NodeFunction extends Object implements Function<Double,Double>, it.unimi.dsi.fastutil.doubles.Double2DoubleFunction
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    addPoint(double in, double out)
    Adds a point to the function.
    apply(Double input)
    Returns the value for the provided input.
    boolean
    contains(double x)
    Returns true if the function contains the provided point.
    double
    get(double input)
     

    Methods inherited from class Object

    equals, 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 DoubleUnaryOperator

    andThen, compose

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

    clear, size
  • Constructor Details

    • NodeFunction

      public NodeFunction()
      Constructor.
  • Method Details

    • apply

      public Double apply(@Nonnull Double input)
      Returns the value for the provided input.
      Specified by:
      apply in interface it.unimi.dsi.fastutil.Function<Double,Double>
      Specified by:
      apply in interface Function<Double,Double>
      Parameters:
      input - for the function
      Returns:
      the vertical value
    • get

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

      @Nonnull public NodeFunction addPoint(double in, double out)
      Adds a point to the function.
      Parameters:
      in - value of the point
      out - value of the point
      Returns:
      this instance
    • contains

      public boolean contains(double x)
      Returns true if the function contains the provided point.
      Parameters:
      x - the point to check for
      Returns:
      true if the point is registered