Re: Cross product template

2013-05-14 Thread Simen Kjaeraas
On Wed, 15 May 2013 03:31:40 +0200, Diggory wrote: I have a vector struct, Vector(T, uint N) templated on the type T and number of components, N. I'm trying to write a function "cross" which will calculate the cross product of a number of vectors. For a given number of components, N, the c

Re: Cross product template

2013-05-14 Thread Diggory
On Wednesday, 15 May 2013 at 01:31:43 UTC, Diggory wrote: I have a vector struct, Vector(T, uint N) templated on the type T and number of components, N. I'm trying to write a function "cross" which will calculate the cross product of a number of vectors. For a given number of components, N, t

Cross product template

2013-05-14 Thread Diggory
I have a vector struct, Vector(T, uint N) templated on the type T and number of components, N. I'm trying to write a function "cross" which will calculate the cross product of a number of vectors. For a given number of components, N, the cross function should take N-1 arguments, each one a Ve