The closed-form angles of a two-segment chain whose tip reaches a goal at
straight-line distance from its root, by the law of cosines.
bend is the interior angle at the mid joint, 180 straight and smaller as
the chain folds; lift is the angle between the upper segment and the
root-to-goal line. The caller orients the chain toward the goal and turns
the mid joint and the root by these angles. A distance below
|upper − lower| or above upper + lower is clamped to that bound and
clamped is set, so the chain fully folds or extends instead of producing
NaN. When both segments are equal and the goal is at the root, lift is 0.
Lengths and distance share one unit. Throws when a length is not finite and
positive, the distance is not finite and non-negative, or relative side
products cannot be represented after common rescaling. Extreme common units
are rescaled before squaring; ordinary lengths retain their arithmetic order.
The closed-form angles of a two-segment chain whose tip reaches a goal at straight-line
distancefrom its root, by the law of cosines.bendis the interior angle at the mid joint, 180 straight and smaller as the chain folds;liftis the angle between the upper segment and the root-to-goal line. The caller orients the chain toward the goal and turns the mid joint and the root by these angles. A distance below|upper − lower|or aboveupper + loweris clamped to that bound andclampedis set, so the chain fully folds or extends instead of producingNaN. When both segments are equal and the goal is at the root,liftis 0.Lengths and distance share one unit. Throws when a length is not finite and positive, the distance is not finite and non-negative, or relative side products cannot be represented after common rescaling. Extreme common units are rescaled before squaring; ordinary lengths retain their arithmetic order.