lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>> {1,2,3}*{4,5,6} -- to be debated, {4,10,18} or 32 or error
>
> I vote for the first one; dot-product can be a method. (Cross-product
> is a rather more specialized kind of animal)

A lot of vector libs in C++ use ^ for the cross product since it's a
specific case of the exterior product, which is usually denoted by ^.
The dot product could simply be sum({1,2,3}*{4,5,6}),