• Parameters

    • points: [number, number][] = []

      array of points, each point an array of numbers

    • Optional includeCollinear: boolean = false

      true will include points collinear along the boundary

    • Optional epsilon: number = EPSILON

      undefined behavior when larger than 0.01

    Returns number[]

    not the points, but the indices of points in your "points" array

    Description

    Convex hull from a set of 2D points, choose whether to include or exclude points which lie collinear inside one of the boundary lines. modified Graham scan algorithm.