Bug 6862 – std.math: implement toRadians and fromRadians
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-10-29T13:05:00Z
Last change time
2011-10-29T13:34:29Z
Assigned to
nobody
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2011-10-29T13:05:42Z
Simplest case w/o float/real specializations:
double toRadians(double degrees)
{
return degrees * (PI / 180.0);
}
double fromRadians(double radians)
{
return radians * (180.0 / PI);
}
I think this belongs in std.math? The second function could be called 'toDegrees', but I think this name might be a little ambiguous.
Comment #1 by bearophile_hugs — 2011-10-29T13:12:30Z
See bug 5900 :-(
Comment #2 by bugzilla — 2011-10-29T13:34:29Z
*** This issue has been marked as a duplicate of issue 5900 ***