pi
Last modified by admin on 2023/08/18 10:41
Pi menas the number π. π ≈ 3,14159265358979.
It can be used for calculations in a circle.
Area of a circle: A = r^2 * π, when r is the radius of the circle.
Perimeter of a circle: p = 2 * r * π, when r is the radius of the circle.
Where can you use this function? With the pi function you can calculate the ratio between the perimeter and the diameter (= 2 * radius). With this information you can draw something like this:
Code: