Background
An Eisenstein integer is a complex number of the form \$ z = a + b\omega \$ where \$a, b\$ are integers and \$\omega\$ is the third root of unity \$\frac{1-\sqrt3i}{2}\$. The Eisenstein integers can be viewed as the triangular lattice points, as shown in the image below (from Wikipedia):
Following the triangular grid, one step of movement can be done in six directions:
$$ \begin{array}{r|r} \text{Direction} & \text{Step} \\ \hline E & 1 \\ NE & 1 + \omega \\ NW & \omega \\ W & -1 \\ SW & -1 - \omega \\ SE & -\omega \end{array} $$
Task
Given an Eisenstein integer \$z\$, count all shortest paths from the origin (\$0\$) to the point equivalent to \$z\$ on the triangular grid.
Since \$z = a + b \omega\$ can be represented by two integers \$ a, b \$, you can take the input as two integers \$a, b\$ in any consistent order and structure of your choice.
One way to compute this is (thanks to @xnor):
Take the absolute values of [a, b, a-b], and call it L Calculate binomial(max(L), any other value in L) Test cases
a b ans 0 0 1 2 0 1 5 3 10 4 4 1 2 3 3 0 2 1 -2 2 6 -4 0 1 -5 -3 10 -1 -1 1 -3 -5 10 0 -3 1 4 -1 5 -4 -9 126 7 -4 330 8 1 8 3 -3 20 
Take the absolute values of [a, b, a-b], and call it L. Calculate binomial(max(L), any other value in L)\$\endgroup\$