It's a common problem to navigate in a 2D matrix. We've seen it many times and will see again. So let's help future us and develop the shortest solutions to generate all eight possible steps in a 2D matrix.
Challenge
Your code must output the following 8 pairs of -1,0,1 in any order:
(0,1)
(0,-1)
(1,0)
(-1,0)
(1,1)
(1,-1)
(-1,1)
(-1,-1)
Rules
- There is no input.
- Output order is not relevant
- Output is flexible. Pairs of numbers just need to be distinguishable
- This is code-golf, so shortest answer in bytes wins
(1 + 0i)
? \$\endgroup\$