watmough / glmatrix

Automatically exported from code.google.com/p/glmatrix
0 stars 1 forks source link

Switching the order of operands in matrix multiply operations #52

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Multiplying matrices currently works this way:

multiply(arg1, arg2, dest);

if dest is not provided the result is saved into arg1...

but the actual operation is carried out this way (and this is my beef with it):

arg2 * arg1

with the result of this operation written out to dest or arg1 if dest is not 
specified,

With dest not specified, the generally assumed [in this API] left-to-right 
flow, is broken because it leads to this result:

multiply(arg1, arg2) --> arg1 = arg2 * arg1

I think that the operation should be internally carried out as arg1 * arg2, 
with the modifications in other methods and the way the API is used as 
necessary.

Original issue reported on code.google.com by Pana...@gmail.com on 12 Apr 2011 at 10:00