def centroid_of_sum_go

bend-prot@0.1.0.0 · protein.bend:76

import bend-prot@0.1.0.0/protein.bend as Protein
import Base
import bend-prot@0.1.0.0/geom.bend as G

76def centroid_of_sum_go(sum: G.Vec3, n: Nat) -> G.Vec3:
77  match n:
78    case 0n:
79      sum
80    case 1n+p:
81      G.Vec3.scale((1.0 / (F32.from_nat(n)) : F32), sum)

Uses (6)

Used by (1)