W3C home > Mailing lists > Public > www-svg@w3.org > November 2007

The trouble with matrix multiplication « code monk

From: Karl Dubost <karl@w3.org>
Date: Wed, 21 Nov 2007 19:51:36 +0900
Message-Id: <D8776C3B-6764-4241-8DF6-7C01C7BF7B4A@w3.org>
To: www-svg@w3.org

For Information

     The trouble with matrix multiplication

is that it’s not commutative. That means that when the SVG spec says  
in the documentation for the multiply method in the SVGMatrix DOM  
“this matrix is post-multiplied by another matrix” it really does  
matter which way round you do the multiplication of the two matrices.

In the call «A.multiply(B)», A is this and should be post-multiplied  
by B. In the usual mathematical convention the result should be AB.

Safari computes BA, Firefox computes AB. Oopsy.

     -- The trouble with matrix multiplication « code monk
     Wed, 21 Nov 2007 10:50:19 GMT

Karl Dubost - W3C
Be Strict To Be Cool
Received on Wednesday, 21 November 2007 10:51:49 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:38 GMT