(v: number)
| 40 | const clampInt = (v: number, lo: number, hi: number): number => Math.min(hi, Math.max(lo, v | 0)); |
| 41 | |
| 42 | const nextPow2 = (v: number): number => { |
| 43 | if (!Number.isFinite(v) || v <= 0) return 1; |
| 44 | const n = Math.ceil(v); |
| 45 | return 2 ** Math.ceil(Math.log2(n)); |
| 46 | }; |
| 47 | |
| 48 | const wrapToTau = (thetaRad: number): number => { |
| 49 | if (!Number.isFinite(thetaRad)) return 0; |
no outgoing calls
no test coverage detected