def cos_f

mlbend-generative@0.1.1.0 · main.bend:123

import mlbend-generative@0.1.1.0/main.bend as MlbendGenerative
import Base

123def cos_f(+t: Nat, +steps: Nat) -> F32:
124  +x = (((F32.from_nat(t) / F32.from_nat(steps) : F32) + 0.008 : F32) / 1.008 : F32)
125  +c = F32.cos((1.5707964 * x : F32))
126  (c * c : F32)

Uses (7)

Used by (1)