Interface ArgminVecOpts

    Target-shaping for argminVec: project a write into the reachable workspace before the Jacobian step, sidestepping the rank-deficient swings at the boundary. For an N-link chain rooted at R with reach L, pass clampToDisc(R, L).

    interface ArgminVecOpts {
        clampTarget?: (
            target: { x: number; y: number },
            currentInputs: readonly number[],
        ) => { x: number; y: number };
        damping?: number;
        eps?: number;
    }
    Hierarchy
    Index

    Properties

    clampTarget?: (
        target: { x: number; y: number },
        currentInputs: readonly number[],
    ) => { x: number; y: number }

    Pre-write hook: transform the requested target into one that's guaranteed solvable. Most useful as a workspace clamp.

    damping?: number

    Levenberg-Marquardt damping. Default 1e-6 for argminNum (Jacobian is always well-conditioned for linear constraints) and 1e-3 for argminVec (IK chains hit rank-deficient regimes at full extension). Larger → smaller, more stable updates; smaller → closer to pure pseudoinverse.

    eps?: number

    Finite-difference epsilon for the Jacobian. Default 1e-4.