( minCandidate: number, maxCandidate: number )
| 485 | }; |
| 486 | |
| 487 | const normalizeDomain = ( |
| 488 | minCandidate: number, |
| 489 | maxCandidate: number |
| 490 | ): { readonly min: number; readonly max: number } => { |
| 491 | let min = minCandidate; |
| 492 | let max = maxCandidate; |
| 493 | |
| 494 | if (!Number.isFinite(min) || !Number.isFinite(max)) { |
| 495 | min = 0; |
| 496 | max = 1; |
| 497 | } |
| 498 | |
| 499 | if (min === max) { |
| 500 | max = min + 1; |
| 501 | } else if (min > max) { |
| 502 | const t = min; |
| 503 | min = max; |
| 504 | max = t; |
| 505 | } |
| 506 | |
| 507 | return { min, max }; |
| 508 | }; |
| 509 | |
| 510 | const computeGridArea = (gpuContext: GPUContextLike, options: ResolvedChartGPUOptions): GridArea => { |
| 511 | const canvas = gpuContext.canvas; |
no outgoing calls
no test coverage detected