Example usages of math.pi?

can any of yall give me some simple examples in which math.pi can come in handy?

1 Like

Usually angles are measured in radians (in terms of pi). You could use math.pi in trigonometric functions, for example, print(math.tan(math.pi)) -- Output: -1.2246467991473532e-16, which approximately 0.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.