* Disclaimer: I posted this just to save future search time, for anyone *
* who will need this (for some reason) *
Hello!
Well, I needed an algorithm to find the offset of a point (relative to the origin)
of a square spiral. I looked quite a bit on the internet but couldn't seem to find
a working solution.
I want a code will generate offsets in the following pattern:
So, for example, if I enter try to get the offset of the index 8, I'll recieve (-1, -1).