On 6/06/14 12:05 am, Benoit Jacob wrote:
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)
?
I don't think this is a fair comparison, you used a fraction of a
constant for one and a raw number for the other.
Which is easier to understand:
var turn = 360;
rotate(turn / 5)
or
rotate(1.25663706143592)
?
I realize that radians make more sense mathematically, but for people
who haven't studied it I think degrees are the more 'natural' way of
thinking about angles/rotations. This is reflected in the number of
authors currently using degrees instead of radians for CSS transforms.
- Matt
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform