(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number)
| 17 | export type Matrix = Matrix5x5 | Matrix5x1; |
| 18 | |
| 19 | export function scale(x: number, inLow: number, inHigh: number, outLow: number, outHigh: number): number { |
| 20 | return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow; |
| 21 | } |
| 22 | |
| 23 | export function clamp(x: number, min: number, max: number): number { |
| 24 | return Math.min(max, Math.max(min, x)); |
no outgoing calls
no test coverage detected