Sbx.beta.pick: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/sbx.bend as Sbx Lines 46-52 of unified-nsga-iii@0.2.2.0/sbx.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/sbx.bend&start_line=46&end_line=52 import Base # C#: if rand <= 1/alpha then (rand*alpha)^(1/(η+1)) else (1/(2-rand*alpha))^(1/(η+1)). def beta.pick(+rand: F32, +alpha: F32, +inv: F32, lo: Bool) -> F32: match lo: case True{}: F32.pow(F32.mul(rand, alpha), inv) case False{}: F32.pow(F32.div(1.0, F32.sub(2.0, F32.mul(rand, alpha))), inv) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.pow https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.sub