Multiplies pi by a specified number.
Pi ( n )
Argument |
Description |
---|---|
n |
The number you want to multiply by pi (3.14159265358979323...) |
Double. Returns the result of multiplying n by pi if it succeeds and -1 if an error occurs. If n is null, Pi returns null.
Use Pi to convert angles to and from radians.
This statement returns pi:
Pi(1)
Both these statements return the area of a circle with the radius id_Rad, an instance variable of type double:
Pi(1) * id_Rad^2
Pi(id_Rad^2)
The following statements compute the cosine of a 45-degree angle:
real degree = 45.0, cosine
cosine = Cos(degree * (Pi(2)/360))