• Calculates the Barycentric weights for a Lagrange polynomial for a given set of coordinates. Can be used as a helper function to compute a Lagrange polynomial repeatedly.

    Parameters

    • points: Vector2[]

      An array of coordinates. No two x should be the same.

    Returns number[]