Package org.jfree.data
Class LineFunction2D
java.lang.Object
org.jfree.data.LineFunction2D
- All Implemented Interfaces:
Function2D
public class LineFunction2D extends Object implements Function2D
A function in the form y = a + bx.
-
Constructor Summary
Constructors Constructor Description LineFunction2D(double a, double b)
Constructs a new line function. -
Method Summary
Modifier and Type Method Description double
getValue(double x)
Returns the function value.
-
Constructor Details
-
LineFunction2D
public LineFunction2D(double a, double b)Constructs a new line function.- Parameters:
a
- the intercept.b
- the slope.
-
-
Method Details
-
getValue
public double getValue(double x)Returns the function value.- Specified by:
getValue
in interfaceFunction2D
- Parameters:
x
- the x-value.- Returns:
- the value.
-