Pi PowerScript function
Description
Multiplies pi by a specified number.
Syntax
|
1 |
<span>Pi</span> ( <span>n</span> ) |
|
Argument |
Description |
|---|---|
|
n |
The number you want to multiply by pi |
Return Values
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.
Usage
Use Pi to convert angles to and from radians.
Examples
This statement returns pi:
|
1 |
<span>Pi</span>(1) |
Both these statements return the area of a circle
with the radius id_Rad, an instance
variable of type double:
|
1 |
<span>Pi</span>(1) * id_Rad^2 |
|
1 |
|
1 |
<span>Pi</span>(id_Rad^2) |
The following statements compute the cosine of a
45-degree angle:
|
1 |
real degree = 45.0, cosine |
|
1 |
cosine = Cos(degree * (<span>Pi</span>(2)/360)) |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest