[Issue 6862] New: std.math: implement toRadians and fromRadians

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 29 13:06:53 PDT 2011


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

           Summary: std.math: implement toRadians and fromRadians
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2011-10-29 13:05:42 PDT ---
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.

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


More information about the Digitalmars-d-bugs mailing list