(value: number, minValue: number, maxValue: number)
| 38 | // Statistics & Interpretation utilities |
| 39 | |
| 40 | export function clamp(value: number, minValue: number, maxValue: number): number { |
| 41 | if (value < minValue) return minValue |
| 42 | if (value > maxValue) return maxValue |
| 43 | return value |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Computes a quantile value from a sorted numeric array using linear interpolation. |
no outgoing calls
no test coverage detected