Package mathvoyage.geometry
Class SlopeLine
java.lang.Object
mathvoyage.geometry.SlopeLine
- All Implemented Interfaces:
Line
The type Slope line.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe Coefficient of x.doubleThe Coefficient of y.doubleThe Constant.doubleThe Shift.doubleThe Slope.doubleThe X intercept.doubleThe Y intercept. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the coefficient of x of the line.doubleReturns the coefficient of y of the line.doubleReturns the constant of the line.doublegetShift()Returns the shift of the line.doublegetSlope()Returns the slope of the line.doubleReturns the x-intercept of the line.doubleReturns the y-intercept of the line.
-
Field Details
-
slope
public double slopeThe Slope. -
shift
public double shiftThe Shift. -
yIntercept
public double yInterceptThe Y intercept. -
xIntercept
public double xInterceptThe X intercept. -
coefficientOfX
public double coefficientOfXThe Coefficient of x. -
coefficientOfY
public double coefficientOfYThe Coefficient of y. -
constant
public double constantThe Constant.
-
-
Constructor Details
-
SlopeLine
public SlopeLine(double slope, double shift) Instantiates a new Slope line.- Parameters:
slope- the slopeshift- the shift
-
-
Method Details
-
getSlope
public double getSlope()Returns the slope of the line. -
getShift
public double getShift()Returns the shift of the line. -
getXIntercept
public double getXIntercept()Returns the x-intercept of the line.- Specified by:
getXInterceptin interfaceLine- Returns:
- The x-intercept of the line
-
getYIntercept
public double getYIntercept()Returns the y-intercept of the line.- Specified by:
getYInterceptin interfaceLine- Returns:
- The y-intercept of the line
-
getCoefficientOfX
public double getCoefficientOfX()Returns the coefficient of x of the line.- Specified by:
getCoefficientOfXin interfaceLine- Returns:
- The coefficient of x of the line
-
getCoefficientOfY
public double getCoefficientOfY()Returns the coefficient of y of the line.- Specified by:
getCoefficientOfYin interfaceLine- Returns:
- The coefficient of y of the line
-
getConstant
public double getConstant()Returns the constant of the line.- Specified by:
getConstantin interfaceLine- Returns:
- The constant of the line
-