Unfortunately, this means that vector math operations can quickly become hard to read. For instance, a simple operation such as
Obviously, this is harder to decipher. Its also harder to write, and is more likely to introduce a typo or other bug into your expression. In general, you want to keep things very simple and very readable, because they are then more likely to work. So vector math seems to be a problem.
One good solution is to break up operations like this into a series of simple steps. For instance, we could rewrite the above example:
This version is much easier to follow, and less likely to introduce bugs into your expression. I strongly recommend that you break compound vector math operations up into a series of simple steps, each containing just one operation.
Entire contents © 2001 JJ Gifford.