• Calculates the Lagrange basis polynomial for a given set of x coordinates based on previously computed barycentric weights.

    Parameters

    • points: Vector2[]

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

    • weights: number[]

      An array of precomputed barycentric weights.

    • time: number

      The x coordinate to calculate the basis polynomial for.

    Returns number