Calculates the Lagrange basis polynomial for a given set of x coordinates based on previously computed barycentric weights.
An array of coordinates. No two x should be the same.
An array of precomputed barycentric weights.
The x coordinate to calculate the basis polynomial for.
Calculates the Lagrange basis polynomial for a given set of x coordinates based on previously computed barycentric weights.