(position, pity = [0, 0])
| 86 | }; |
| 87 | |
| 88 | export const isMappedPositionInCorners = (position, pity = [0, 0]) => { |
| 89 | const [x, y] = position; |
| 90 | const [px, py] = pity; |
| 91 | if (x <= 0.0 - px) return false; |
| 92 | if (x >= 1.0 + px) return false; |
| 93 | if (y <= 0.0 - py) return false; |
| 94 | if (y >= 1.0 + py) return false; |
| 95 | return true; |
| 96 | }; |
| 97 | |
| 98 | export const getScaledPosition = (position, corners) => { |
| 99 | const zeroedCorners = getZeroedCorners(corners); |
no outgoing calls
no test coverage detected