(a, b)
| 4 | export const scaleVector = ([x, y], n) => [x * n, y * n]; |
| 5 | |
| 6 | export const addVector = (a, b) => { |
| 7 | const [ax, ay] = a; |
| 8 | const [bx, by] = b; |
| 9 | const x = ax + bx; |
| 10 | const y = ay + by; |
| 11 | return [x, y]; |
| 12 | }; |
| 13 | |
| 14 | export const subtractVector = (a, b) => { |
| 15 | const [ax, ay] = a; |
no outgoing calls
no test coverage detected