Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Line

Index

Constructors

constructor

  • new Line(p1: Point, p2: Point): Line
  • new Line(x1: number, y1: number, x2: number, y2: number): Line
  • Parameters

    Returns Line

  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns Line

Properties

p1

p1: Point

p2

p2: Point

Methods

angle

  • angle(): number
  • Returns number

bounds

closest

copy

direction

distance

  • distance(p: Point): number
  • Parameters

    Returns number

intersection

intersects

  • intersects(l: Line): boolean
  • Parameters

    Returns boolean

length

  • length(): number
  • Returns number

lerp

  • Parameters

    Returns Line

middle

normal

point

  • point(t: number): Point
  • Parameters

    • t: number

    Returns Point

reverse

rotate

  • Parameters

    • a: number

    Returns Line

  • Parameters

    Returns Line

scale

  • Parameters

    • s: number

    Returns Line

  • Parameters

    Returns Line

split

  • split(data: number[]): Line[]
  • Parameters

    • data: number[]

    Returns Line[]

translate

  • translate(x: number, y: number): Line
  • Parameters

    • x: number
    • y: number

    Returns Line