WebCola
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

polygonArea

  • polygonArea(polygon: Array<[number, number]>): number
  • Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order ( assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; otherwise it is negative, or zero.

    Parameters

    • polygon: Array<[number, number]>

      Array of coordinates , and so on.

    Returns number

polygonCentroid

  • polygonCentroid(polygon: Array<[number, number]>): [number, number]
  • Returns the centroid of the specified polygon.

    Parameters

    • polygon: Array<[number, number]>

      Array of coordinates , and so on.

    Returns [number, number]

polygonContains

  • polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean
  • Returns true if and only if the specified point is inside the specified polygon.

    Parameters

    • polygon: Array<[number, number]>

      Array of coordinates , and so on.

    • point: [number, number]

      Coordinates of point

    Returns boolean

polygonHull

  • polygonHull(points: Array<[number, number]>): Array<[number, number]> | null
  • Returns the convex hull of the specified points using Andrew’s monotone chain algorithm. The returned hull is represented as an array containing a subset of the input points arranged in counterclockwise order. Returns null if points has fewer than three elements.

    Parameters

    • points: Array<[number, number]>

      Array of coordinates , and so on.

    Returns Array<[number, number]> | null

polygonLength

  • polygonLength(polygon: Array<[number, number]>): number
  • Returns the length of the perimeter of the specified polygon.

    Parameters

    • polygon: Array<[number, number]>

      Array of coordinates , and so on.

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc