API Reference / featureVector · function
Function: featureVector()
function featureVector(weightedLons): number[];
Build a feature vector from explicit (longitude, weight) pairs: each pair
contributes a weighted unit-circle point [w·cos(lon), w·sin(lon)]. The
low-level primitive behind chartFeatures; most callers want that.
Parameters
| Parameter | Type | Description |
|---|---|---|
weightedLons | [number, number][] | [longitudeDeg, weight] pairs, in the order they should appear in the vector. |
Returns
number[]
A flat vector, two entries per pair.