pi
Description
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.
Input / Parameter
N/A
Output
Description
Output Type
Returns the value of pi.
Number
Example
In this example, we will call the pi function and print the value in the console.
Steps
Drag a
buttoncomponent into the canvas and open theActiontab. Select thepressevent of the button and drag theLog.writefunction to the event flow.Call the function
Math.piinside theLog.writefunction.
Result
The console will print the value of pi.

Last updated