Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I was in the middle of writing an answer, but got stuck at one point. Your approach is correct, but I fear not entirely general since unit vectors can also contain more complex elements, such as unit.arithmetic: b = a + unit(1, "npc"). I'll edit the question. Commented Dec 2, 2015 at 0:23
  • I can see where it can go wrong with unit.arithmetics. If you say that the [<- method will be difficult to implement I have no reason to not believe you. unit.list seems like a good enough solution tbh. Commented Dec 2, 2015 at 0:29
  • 1
    to be fair, I'm just summarising a discussion I had with Paul Murrell, he seems to think this will be difficult. In the meantime, I figured I could post a workaround here. Commented Dec 2, 2015 at 0:35