(corners)
| 60 | }; |
| 61 | |
| 62 | export const getZeroedCorners = (corners) => { |
| 63 | const [a] = corners; |
| 64 | const [ax, ay] = a; |
| 65 | const zeroedCorners = corners.map(([x, y]) => [x - ax, y - ay]); |
| 66 | return zeroedCorners; |
| 67 | }; |
| 68 | |
| 69 | export const getCornersPosition = (corners, number = 0) => { |
| 70 | const corner = corners[number]; |