(a: number, b: number, c: number)
| 167 | // filter type so the defilter logic gets actual coverage. |
| 168 | |
| 169 | const paethRef = (a: number, b: number, c: number): number => { |
| 170 | const p = a + b - c; |
| 171 | const pa = Math.abs(p - a); |
| 172 | const pb = Math.abs(p - b); |
| 173 | const pc = Math.abs(p - c); |
| 174 | if (pa <= pb && pa <= pc) return a; |
| 175 | if (pb <= pc) return b; |
| 176 | return c; |
| 177 | }; |
| 178 | |
| 179 | /** |
| 180 | * Build a PNG with a specific filter type applied to every row. Encodes a |
no test coverage detected