( y: number, height: number, )
| 6 | } |
| 7 | |
| 8 | function normalizeRows( |
| 9 | y: number, |
| 10 | height: number, |
| 11 | ): LayoutDamageRows | null { |
| 12 | if (!Number.isFinite(y) || !Number.isFinite(height) || height <= 0) { |
| 13 | return null |
| 14 | } |
| 15 | const top = Math.floor(y) |
| 16 | const bottom = Math.ceil(y + height) |
| 17 | if (!Number.isFinite(top) || !Number.isFinite(bottom) || bottom <= top) { |
| 18 | return null |
| 19 | } |
| 20 | return { y: top, height: bottom - top } |
| 21 | } |
| 22 | |
| 23 | export function addLayoutDamageRows( |
| 24 | current: LayoutDamageRows | null, |
no outgoing calls
no test coverage detected