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

ParameterTypeDescription
lonsRecord<string, number>Body longitudes in degrees, keyed by body id.
constraintsConstraint[]The constraints to score.

Returns

number

The total weighted loss in degrees (0 = all satisfied).

Start building

Quickstart →