Line (Geom Package) - michael-lemberger/Pacman-Gps-Game GitHub Wiki

Line class:creats a line equastion between two points.ax-b or Y(if y=a) or X (if x=a).MMX/MMY the range of y or x.

Main Functions

public Line(Point3D p1,Point3D p2)

Constructor.
calculates one of the following equations:

  1. y=a. (If its a line parallel to Y axis).

2. x=a. (If its a line parallel to X axis).
3.y=ax-b (general equation).

isCutting(Line line)

We equalise an two equations of a line, if we find out that does two line cut inside the range we want to check, we say they are cutting each other.

MinMax(double a,double b)

saves the range of 2 points. (y and x)

LineEquasion(Point3D inPixel1,Point3D inPixel2)

Generates the general eqution.

⚠️ **GitHub.com Fallback** ⚠️