
2 May
2008
2 May
'08
10:09 p.m.
On Fri, May 2, 2008 at 3:02 PM, Michael Fawcett <michael.fawcett@gmail.com> wrote:
float magnitude = sqrt(dot_product(point, point));
The dot_product internals are where the compile-time access takes place. dot_product would therefore work on arrays, tuples, and fusion tuples out of the box and any custom type simply needs to add get<> support (which would hopefully be trivial, perhaps using Fusion).
I didn't follow this discussion so far but I am also in favor of get<> overloads for types that are tuple-like, including 2D, 3D and 4D vectors. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode