Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "math/euclidean-distance"

Index

Functions

Functions

euclideanDistance

  • euclideanDistance(point1: Point, point2: Point): number
  • euclideanDistance(point1: [number, number], point2: [number, number]): number
  • euclideanDistance(x1: number, y1: number, x2: number, y2: number): number
  • Gets the Euclidean distance between two points (x1, y1) and (x2, y2). Pythagorean theorem: The distance between two points is the length of the path connecting them.

    Parameters

    • point1: Point

      { x, y } Point 1.

    • point2: Point

      { x, y } Point 2.

    Returns number

    The euclidean distance between the two points.

  • Gets the Euclidean distance between two points (x1, y1) and (x2, y2). Pythagorean theorem: The distance between two points is the length of the path connecting them.

    Parameters

    • point1: [number, number]

      [ x, y ] point 1.

    • point2: [number, number]

      [ x, y ] point 2.

    Returns number

    The euclidean distance between the two points.

  • Gets the Euclidean distance between two points (x1, y1) and (x2, y2). Pythagorean theorem: The distance between two points is the length of the path connecting them.

    Parameters

    • x1: number

      Point 1's x.

    • y1: number

      Point 1's y.

    • x2: number

      Point 2's x.

    • y2: number

      Point 2's y.

    Returns number

    The euclidean distance between the two points.

Generated using TypeDoc