(edge)
| 3229 | } |
| 3230 | |
| 3231 | function graphWeight(edge) { |
| 3232 | const weight = Number(edge?.weight); |
| 3233 | if (!Number.isFinite(weight)) return 1; |
| 3234 | return Math.max(0.08, Math.min(1.6, weight)); |
| 3235 | } |
| 3236 | |
| 3237 | function clamp(value, min, max) { |
| 3238 | return Math.max(min, Math.min(max, value)); |
no outgoing calls
no test coverage detected