pi
Last updated
Last updated
Get the value of pi, which is the ratio of the circumference of a circle to its diameter. The output will return approximately 3.14159.
N/A
Returns the value of pi.
Number
In this example, we will call the pi
function and print the value in the console.
Drag a button
component into the canvas and open the Action
tab. Select the press
event of the button and drag the Log.write
function to the event flow.
Call the function Math.pi
inside the Log.write
function.
The console will print the value of pi.