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.

Required fields*

7
  • 3
    And you're not implementing any of the standard forms of vector multiplication here (not dot product, cross product, nor tensor product). Commented Nov 20, 2009 at 18:07
  • 1
    Component-wise multiplication has it's uses, but the dimensional limit imposed by the macro makes it not so useful. Commented Nov 20, 2009 at 18:17
  • 1
    @outis: This is intended to be used in areas where the dimensional limit is strictly imposed by the very nature of the application area. Like in 3D graphics, for example. Commented Nov 20, 2009 at 18:30
  • 34
    But suppose it the number of dimensions in the universe changes, the code will break - this is the sort of shortsightedness that led to the Y2K problem. Commented Nov 20, 2009 at 18:41
  • 8
    Yeah... It like that famous quote from Xerox manual. One of the benefits of declaring PI as a named constant is that it helps you to adjust the code in case the value of Pi changes. Commented Nov 20, 2009 at 19:09