(x: number, y: number)
| 15 | type XY = [number, number]; |
| 16 | |
| 17 | const pt = (x: number, y: number): Coordinate => ({ |
| 18 | latitude: CENTER.latitude + y * S + OY, |
| 19 | longitude: CENTER.longitude + x * S + OX, |
| 20 | }); |
| 21 | |
| 22 | const catmullRom = (points: XY[], samples = 12): Coordinate[] => { |
| 23 | if (points.length < 2) return points.map(([x, y]) => pt(x, y)); |
no outgoing calls
no test coverage detected