(values)
| 2925 | } |
| 2926 | |
| 2927 | function maxAbsValue(values) { |
| 2928 | let max = 0; |
| 2929 | for (let i = 0; i < values.length; i += 1) { |
| 2930 | const magnitude = Math.abs(values[i]); |
| 2931 | if (magnitude > max) { |
| 2932 | max = magnitude; |
| 2933 | } |
| 2934 | } |
| 2935 | return max; |
| 2936 | } |