File-By-File
EquationSpline

EquationSpline

This class is an implementation of the Spline interface that utilizes an Equation to determine points along the spline. It allows for defining a spline's curve based on a mathematical equation, optionally clipping the X-values to a specified range.

Methods

EquationSpline(Equation equation)

Constructs a new EquationSpline using the provided Equation. In this constructor, no X-value clipping is applied, and the start and end points are initially null.

EquationSpline(Equation equation, double minimumX, double maximumX)

Constructs a new EquationSpline using the provided Equation and defines a range for X-values. The spline will only interpolate within [minimumX, maximumX]. The startPoint and endPoint are set based on these minimum and maximum X-values.

interpolateY(double x)

Returns the Y-value of the spline at a given X-value. If the spline was constructed with minimumX and maximumX, the input x will be clipped to this range before the Equation is used for interpolation.

getStartPoint()

Returns the starting PointXY of the spline. If the spline was constructed without minimumX and maximumX, this method will throw a NullPointerException.

getEndPoint()

Returns the ending PointXY of the spline. If the spline was constructed without minimumX and maximumX, this method will throw a NullPointerException.