(position, corners, safe = true)
| 54 | // Corners... of a deeper screen |
| 55 | // Return: If we treat the deeper screen as the co-ordinates, where should we place the position? |
| 56 | export const getMappedPosition = (position, corners, safe = true) => { |
| 57 | const mappedPosition = ibilerp(position, corners); |
| 58 | if (!safe) return mappedPosition; |
| 59 | return mappedPosition.map((axis) => (isNaN(axis) ? 0 : axis)); |
| 60 | }; |
| 61 | |
| 62 | export const getMappedPositions = (positions, corners) => { |
| 63 | const mappedPositions = positions.map((position) => |
no test coverage detected