I ended up using

`where`

to make dispatch to the correct version of cross product (or non at all for most dimensions).Having the 7D cross product is a bit silly -- but it feels like a very nice use of

`where`

. I think I will soon go back through most of the other operators and add `where`

clauses to the second parameter, to make sure it has the same dimension as the first.Of course, I don't have any idea what the 7D solutions should look like. Luckily, I have now have a test script, so I can write tests to make sure that the results of the 7D cross product obey the proper identities:

General: I forgot to mention last time that pmichaud is looking at fixing the bug that stops you from building a more complex version of an operator out of simpler versions of the same operator. When that gets fixed, the vector addition and subtraction and vector/scalar multiplication and division will look a lot nicer.

## No comments:

## Post a Comment