def centroid_of_sum_go
import bend-prot@0.1.0.0/protein.bend as Proteinimport 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)