6
$\begingroup$

Get π in python scripted expression for a driver?

$\endgroup$
  • $\begingroup$ pi or radians(180) $\endgroup$ – user7952 Dec 14 '14 at 0:22
  • 1
    $\begingroup$ @SixthOfFour thanks... I tried math.pi, after nearly a year of javascript & php, I just couldn't believe it was as simple as pi! :D P.S. Post that as an answer $\endgroup$ – GiantCowFilms Dec 14 '14 at 0:24
  • $\begingroup$ I think math is already imported by default, and mapped so you needn't specify it. I'm still learning Python though, so I'm not sure how it's done. However, I use XYZ math surface quite a lot, and it has both pi and radians() without having to specify the math module. $\endgroup$ – user7952 Dec 14 '14 at 0:38
9
$\begingroup$

pi or radians(180) should do the trick.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks for the edit. I didn't know about the backticks. I'll try to remember them. :) $\endgroup$ – user7952 Dec 14 '14 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.