Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let answer = coords1_intoXY.filter(coords1 => coords2_intoXY.every(coords2 => {
- let x = Number(coords1[0]) - Number(coords2[0])
- let y = Number(coords1[1]) - Number[coords2[1]]
- return Math.hypot(x, y) < 5
- }))
- return answer.map(coords => coords.join('|'));
Add Comment
Please, Sign In to add comment