def add_forces

bend-prot@0.1.0.0 · sim.bend:158

import bend-prot@0.1.0.0/sim.bend as Sim
import Base
import bend-prot@0.1.0.0/geom.bend as G

158def add_forces(a: List<&2, G.Vec3>, b: List<&2, G.Vec3>) -> List<&2, G.Vec3>:
159  match a b:
160    case Nil{} Nil{}:
161      Nil{}
162    case Nil{} bh <> bt:
163      Nil{}
164    case ah <> at Nil{}:
165      Nil{}
166    case ah <> at bh <> bt:
167      G.Vec3.add(ah, bh) <> add_forces(at, bt)

Uses (3)

Used by (3)