http://d.puremagic.com/issues/show_bug.cgi?id=5900


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugd...@yahoo.com.au


--- Comment #2 from Don <clugd...@yahoo.com.au> 2011-04-28 00:31:53 PDT ---
It's worse than that. A bigger issue is that it encourages the wrong approach.
These functions would encourage people to write wrong code like this:
sin(degreesToRadians(360));
Which gives the wrong answer -- sin(360degrees) should be EXACTLY zero, not a
small nonsense value like 1.4534e-17.
I don't think it's fair to trick people like that.

The correct way to do trig with degrees is:  sin( ((x%360.0)/180)*PI );
I'll put this in the docs for std.math, since it's not obvious.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to