Class Line

java.lang.Object
velo.ladaalpha.fields.math.Line

public class Line extends Object
The Class Line.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Line(double x1, double x2, double y1, double y2)
    Instantiates a new line.
    Line(Point a, Point b)
    Instantiates a new line.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    compute(double x)
    Compute.
    double
    Gets the x1.
    double
    Gets the x2.
    double
    Gets the y1.
    double
    Gets the y2.
    lerp(double t)
    Lerp.
    void
    setX1(double x1)
    Sets the x1.
    void
    setX2(double x2)
    Sets the x2.
    void
    setY1(double y1)
    Sets the y1.
    void
    setY2(double y2)
    Sets the y2.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Line

      public Line(Point a, Point b)
      Instantiates a new line.
      Parameters:
      a - the a
      b - the b
    • Line

      public Line(double x1, double x2, double y1, double y2)
      Instantiates a new line.
      Parameters:
      x1 - the x 1
      x2 - the x 2
      y1 - the y 1
      y2 - the y 2
  • Method Details

    • lerp

      public Point lerp(double t)
      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