Package velo.ladaalpha.fields.math
Class Line
java.lang.Object
velo.ladaalpha.fields.math.Line
The Class Line.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(double x) Compute.doublegetX1()Gets the x1.doublegetX2()Gets the x2.doublegetY1()Gets the y1.doublegetY2()Gets the y2.lerp(double t) Lerp.voidsetX1(double x1) Sets the x1.voidsetX2(double x2) Sets the x2.voidsetY1(double y1) Sets the y1.voidsetY2(double y2) Sets the y2.
-
Constructor Details
-
Line
Instantiates a new line.- Parameters:
a- the ab- the b
-
Line
public Line(double x1, double x2, double y1, double y2) Instantiates a new line.- Parameters:
x1- the x 1x2- the x 2y1- the y 1y2- the y 2
-
-
Method Details
-
lerp
Lerp.- Parameters:
t- the t- Returns:
- the point
-
compute
public double compute(double x) Compute.- Parameters:
x- the x- Returns:
- the double
-
getX1
public double getX1()Gets the x1.- Returns:
- the x1
-
setX1
public void setX1(double x1) Sets the x1.- Parameters:
x1- the new x1
-
getX2
public double getX2()Gets the x2.- Returns:
- the x2
-
setX2
public void setX2(double x2) Sets the x2.- Parameters:
x2- the new x2
-
getY1
public double getY1()Gets the y1.- Returns:
- the y1
-
setY1
public void setY1(double y1) Sets the y1.- Parameters:
y1- the new y1
-
getY2
public double getY2()Gets the y2.- Returns:
- the y2
-
setY2
public void setY2(double y2) Sets the y2.- Parameters:
y2- the new y2
-