Function polygonContains

  • Returns true if and only if the specified point is inside the specified polygon.

    Parameters

    • polygon: [number, number][]

      Array of coordinates <x0, y0>, <x1, y1> and so on.

    • point: [number, number]

      Coordinates of point <x, y>.

    Returns boolean