Package eu.woolplatform.utils.math
Class LinearFunction
- java.lang.Object
-
- eu.woolplatform.utils.math.LinearFunction
-
public class LinearFunction extends Object
A linear function is a function that is defined by straight line segments between a series of points. If there are no points, the function is defined by the straight horizontal line y = 0. If there is one point, the function is defined by the straight horizontal line through that point. If there are two or more points, the function value of a point between the first point and the last point is defined by the line segment between two points. For points before the first point, the value is defined by extending the first line segment (between the first and second point). For points after the last point, the value is defined by extending the last line segment.
-
-
Constructor Summary
Constructors Constructor Description LinearFunction()Constructs a new linear function without any points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoint(float x, float y)Adds a point.floatget(float x)Returns the function value for the specified point.
-