Constructors
constructor
- new Line(p1: Point, p2: Point): Line
- new Line(x1: number, y1: number, x2: number, y2: number): Line
-
Parameters
-
Parameters
-
x1: number
-
y1: number
-
x2: number
-
y2: number
Methods
distance
- distance(p: Point): number
-
Parameters
Returns number
intersects
- intersects(l: Line): boolean
-
Parameters
Returns boolean
split
- split(data: number[]): Line[]
-
Parameters
Returns Line[]
translate
- translate(x: number, y: number): Line