On Jun 5, 2014, at 18:34 , Rik Cabanier <caban...@gmail.com> wrote:

> On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan <rob...@ocallahan.org>
> wrote:
> 
>> On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier <caban...@gmail.com> wrote:
>> 
>>> ...
> 
> 
>> Then there's this case:
>> var m = new DOMMatrix();
>> m.translate(-1,-1);
>> m.translate(1,1);
>> m.isIdentity() == false
>> 
>> I'm OK with that. Maybe we do need a better name though. Invert the
>> meaning and call it "maybeHasTransform()"?
>> 
> 
> That sounds good to me.

That just feels very wrong.  I understand not having an isIdentity() method as 
Benoit proposes.  The argument being “is identity question is more complicated 
than you think, so we won’t let you ask it, and instead you have to do it 
manually, which means you understand what’s going on”.

I don’t understand having isIdentity() method and having it return false when 
you actually have an identity transform.  If it was “hasBeenModified()” or some 
such, I can understand having it behave that way.

I’d much rather have “isIdentityExactly()” or "isCloseToIdentity(float 
tolerance)” for a given definition of tolerance.  Or not have it at all and 
write the JS utility myself.

--
- Milan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to