I do have three upvotes, but I still can't quite decide if I chose the correct place to ask this question, since my own solution doesn't feel quite "final" enough to me, I'm wondering if what I'm asking is really "Code Review".
I feel the upvotes could have simply been because of the effort I put in describing the issue and how I described what I'm trying to do, rather than because the question is good for this site.
I was first going to place the question on the Physics stack exchange, but it became dependent on my code. I considered the main SO site, but decided to to post it here because it comes off as "How can I improve my code", which does seem like what this site handles, except for what I mentioned before - it isn't really "final" code I'm showing.
Is this the best place for it? At what point is the line drawn between a question about "pseudo-code" (should be asked elsewhere), and a question about "Let's improve this code"?