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: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@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: -------

Reply via email to