On Thu, Jun 5, 2014 at 5:05 AM, Benoit Jacob <jacob.benoi...@gmail.com>
wrote:

>
>
>
> 2014-06-05 2:48 GMT-04:00 Rik Cabanier <caban...@gmail.com>:
>
>
>>
>>
>> On Wed, Jun 4, 2014 at 2:20 PM, Milan Sreckovic <msrecko...@mozilla.com>
>> wrote:
>>
>>> In general, is “this is how it worked with SVGMatrix” one of the design
>>> principles?
>>>
>>> I was hoping this would be the time matrix rotate() method goes to
>>> radians, like the canvas rotate, and unlike SVGMatrix version that takes
>>> degrees...
>>>
>>
>> "degrees" is easier to understand for authors.
>> With the new DOMMatrix constructor, you can specify radians:
>>
>> var m = new DOMMatrix('rotate(1.75rad)' ;
>>
>> Not specifying the unit will make it default to degrees (like angles in
>> SVG)
>>
>
>
> The situation isn't symmetric: radians are inherently simpler to implement
> (thus slightly faster), basically because only in radians is it true that
> sin(x) ~= x for small x.
>
> I also doubt that degrees are simpler to understand, and if anything you
> might just want to provide a simple name for the constant 2*pi:
>
> var turn = Math.PI * 2;
>
> Now, what is easier to understand:
>
> rotate(turn / 5)
>
> or
>
> rotate(72)
>

The numbers don't lie :-)
Just do a google search for "CSS transform rotate". I went over 20 pages of
results and they all used "deg".
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to