API Reference / formLoss · function
Function: formLoss()
function formLoss(lons, constraints): number;
Total weighted loss for a set of body longitudes — the sum of each constraint's constraintLoss times its weight. The objective compileForm minimizes.
Parameters
| Parameter | Type | Description |
|---|---|---|
lons | Record<string, number> | Body longitudes in degrees, keyed by body id. |
constraints | Constraint[] | The constraints to score. |
Returns
number
The total weighted loss in degrees (0 = all satisfied).