Search code examples
pythonopen-sourceradians

python source code for "radians"


I need to match the implementation of my c code for x*pi/180.00, where x is in degrees, to that of Python's radians(x). I would like to see Python's source code for the radians function. I have tried both

print inspect.getsource(type(radians))

and

print getsource(radians)

with no success. Any thoughts?


Solution

  • (3.14159265358979323846/180.0)

    180.0/3.14159265358979323846