( minCandidate: number, maxCandidate: number )
| 345 | }; |
| 346 | |
| 347 | const normalizeDomain = ( |
| 348 | minCandidate: number, |
| 349 | maxCandidate: number |
| 350 | ): { readonly min: number; readonly max: number } => { |
| 351 | let min = minCandidate; |
| 352 | let max = maxCandidate; |
| 353 | |
| 354 | if (!Number.isFinite(min) || !Number.isFinite(max)) { |
| 355 | min = 0; |
| 356 | max = 1; |
| 357 | } |
| 358 | |
| 359 | if (min === max) { |
| 360 | max = min + 1; |
| 361 | } else if (min > max) { |
| 362 | const t = min; |
| 363 | min = max; |
| 364 | max = t; |
| 365 | } |
| 366 | |
| 367 | return { min, max }; |
| 368 | }; |
| 369 | |
| 370 | type CartesianHitTestMatch = Readonly<{ |
| 371 | kind: 'cartesian'; |
no outgoing calls
no test coverage detected