code wiki / _hdl_build / _cn_flow.nx
_cn_flow.nx source
↩ module page · 8 lines · 332 B
1// AUTHORED BY THE NISHI BUILDER (pattern: THRESHOLD_TABLE) -- 3-point linear interp, no Claude logic
2import "nx_syscalls.nx"
3func _cn_flow_lookup(x: i64) -> i64 {
4 if x <= 190 { return 6000 }
5 if x >= 230 { return 13000 }
6 if x <= 210 { return 6000 + (4000) * (x - 190) / 20 }
7 return 10000 + (3000) * (x - 210) / 20
8}