W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2013

Re: comments on Matrix

From: Dirk Schulze <dschulze@adobe.com>
Date: Thu, 21 Mar 2013 11:59:05 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Rik Cabanier <cabanier@gmail.com>, James Robinson <jamesr@google.com>, Benoit Jacob <jacob.benoit.1@gmail.com>, "public-fx@w3.org" <public-fx@w3.org>
Message-ID: <304A2133-E6CD-4A42-92EF-2955CAB8BF68@adobe.com>

On Mar 21, 2013, at 11:52 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:

> On Thu, Mar 21, 2013 at 11:47 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>> On Thu, Mar 21, 2013 at 11:36 AM, James Robinson <jamesr@google.com> wrote:
>>> On Thu, Mar 21, 2013 at 11:33 AM, Rik Cabanier <cabanier@gmail.com> wrote:
>>>> I'll formally object to an exception being thrown here.
>>>> 
>>>> SVG matrix throws an exception and since this is a drop-in replacement,
>>>> Matrix needs to throw one too :-(
>>> 
>>> This is a clear example of SVG making a (bad) mistake that we should not
>>> inflict on the rest of the web platform.
>> 
>> Are you objecting to any exceptions being thrown?
>> There are exceptions in all authors facing APIs.
> 
> No, he objects for the same reason I am - a matrix being singular is
> not a particularly exceptional situation

A singular matrix does not mean the same as NaN and Inf values in the matrix.

However, you need to take a look when you use inverse() for transformation matrices (again, that is the focus here). They are used to transform between coordinate spaces. And then a returning singular matrix does not make sense.

Dirk

> , and whether an
> implementation considers a matrix singular will depend in some cases
> on the exact algorithm and FP implementation being used.  This is,
> thus, a *terrible* example of a place to throw an exception, as
> authors won't expect it, and it'll vary between platforms for no
> important reason.
> 
> ~TJ
> 
Received on Thursday, 21 March 2013 18:59:58 GMT

This archive was generated by hypermail 2.3.1 : Thursday, 21 March 2013 18:59:58 GMT