2014-06-05 18:59 GMT-04:00 Matt Woodrow <mwood...@mozilla.com>: > 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 just meant that neither radians nor degrees are significantly easier than the other, since in practice this is just changing the value for the "turn" constant that people shouldn't be writing manually, i.e. even in degrees people should IMHO write turn/4 instead of 90.
Benoit _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform