Given a grid, starting at the center and spiraling out, and an Position what is the ID?
JavaScript (ES6), 64 bytes
Takes input in currying syntax (x)(y).
x=&gt;y=&gt;(d=(A=Math.abs)(A(x)-A(y))+A(x)+A(y))*d+(d-x+y)*(-y&gt;x||-1)

Try it online!
Heavily inspired by this answer from math.stackexchange.com.