(a: Matrix, b: Matrix, aName: string, bName: string)
| 26 | } |
| 27 | |
| 28 | export function assertValidMatrices(a: Matrix, b: Matrix, aName: string, bName: string): void { |
| 29 | assertValidMatrix(a,aName) |
| 30 | assertValidMatrix(b,bName) |
| 31 | |
| 32 | if (b.length !== a[0]!.length) { |
| 33 | throw new Error(`Columns in ${aName} should be the same as the number of rows in ${bName}`); |
| 34 | } |
| 35 | } |
no test coverage detected