Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "2d/line"

Index

Functions

isParallel

  • isParallel(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x4: number, y4: number): boolean
  • Checks if the lines are parallel and returns the answer accordingly.

    Parameters

    • x1: number

      X position of the first point of line 1.

    • y1: number

      Y position of the first point of line 1.

    • x2: number

      X position of the second point of line 1.

    • y2: number

      Y position of the second point of line 1.

    • x3: number

      X position of the first point of line 2.

    • y3: number

      Y position of the first point of line 2.

    • x4: number

      X position of the second point of line 2.

    • y4: number

      Y position of the second point of line 2.

    Returns boolean

    true if the lines are parallel, else it returns false.

isPerpendicular

  • isPerpendicular(slope1: number, slope2: number): boolean
  • Checks if the lines are perpendicular given both slopes and returns the answer accordingly.

    Parameters

    • slope1: number

      The slope of the first line.

    • slope2: number

      The slope of the second line.

    Returns boolean

    true if the lines are perpendicular, else it returns false.

Made by Horyus. Documentation generated by TypeDoc.