Rng.idx_from: def of unified-nsga-iii@0.2.2.0 Import: import unified-nsga-iii@0.2.2.0/rng.bend as Rng Lines 71-76 of unified-nsga-iii@0.2.2.0/rng.bend: https://jend.leeeet.dev/read.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&start_line=71&end_line=76 import Base def idx_from(+z: F32, n: Nat) -> Nat: match n: case 0n: 0n case 1n++p: clamp_lt(F32.to_nat(F32.trunc(F32.mul(z, F32.from_nat(1n+p)))), 1n+p) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.from_nat 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.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32.trunc https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=unified-nsga-iii@0.2.2.0/rng.bend&name=clamp_lt