def rope_tab
bendtorch@1.3.0.0 · main.bend:2275
import bendtorch@1.3.0.0/main.bend as Bendtorch
import Base
2275
2276def rope_tab(left: Nat, +e: U32, +half: U32, +base: F32, tb: CS) -> CS:
2277 match left tb:
2278 case 0n CS{cs, sn}:
2279 +ang = rope_ang(e, half, base)
2280 CS{Array.set(F32, cs, e, F32.cos(ang)), Array.set(F32, sn, e, F32.sin(ang))}
2281 case 1n+q CS{cs, sn}:
2282 +ang = rope_ang(e, half, base)
2283 rope_tab(q, (e + 1 : U32), half, base, CS{Array.set(F32, cs, e, F32.cos(ang)), Array.set(F32, sn, e, F32.sin(ang))})