(dash: number[])
| 427 | } |
| 428 | |
| 429 | function getLineBlockLengthY(dash: number[]): number { |
| 430 | let blockLength = 0; |
| 431 | for (let i = 0; i < dash.length; ++i) { |
| 432 | blockLength += dash[i]; |
| 433 | } |
| 434 | if (dash.length % 2 === 1) { |
| 435 | // [4, 2, 1] means |---- - -- |---- - -- | |
| 436 | // So total length is (4 + 2 + 1) * 2 |
| 437 | return blockLength * 2; |
| 438 | } |
| 439 | return blockLength; |
| 440 | } |
no outgoing calls
no test coverage detected