Function mix

    • Weighted blend of K branches over any Linear type: reads the normalized weighted sum Σ wᵢ·aᵢ, writes the minimum-norm delta back into the branches (zero-weight branches untouched). Weights are read-only reactive controls — a one-hot is select, a (1−t, t) edge is crossfade.

      Type Parameters

      • S extends Traits<any, "linear">

      Parameters

      • weights: readonly Val<number>[]
      • branches: readonly Writable<S>[]

      Returns Writable<S>