forked from processing-js/processing-js.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPI.html
More file actions
111 lines (45 loc) · 1.33 KB
/
Copy pathPI.html
File metadata and controls
111 lines (45 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
layout: default
---
<table cellpadding="0" cellspacing="0" border="0" class="ref-item">
<tr class="name-row">
<th scope="row">Name</th>
<td><h3>PI (3.14159...)</h3></td>
</tr>
<tr class="">
<th scope="row">Examples</th>
<td><div class="example"><img src="/reference/PI.gif" alt="example pic" /><pre class="margin">float f = 0.0;
beginShape(POLYGON);
while(f < PI) {
vertex(width/2 + cos(f)*40, height/2 + sin(f)*40);
f += PI/12.0;
}
endShape();</pre></div></td>
</tr>
<tr class="">
<th scope="row">Description</th>
<td>PI is a mathematical constant with the value 3.14159265358979323846. It is the ratio of the circumference of a circle to its diameter. It is useful in combination with the trigonometric functions <b>sin()</b> and <b>cos()</b>.</td>
</tr>
<tr class="">
<th scope="row">Syntax</th>
<td><pre>PI</pre></td>
</tr>
<tr class="">
<th scope="row">Parameters</th>
<td><table cellpadding="0" cellspacing="0" border="0">
<tr class="">
<th scope="row"></th>
<td></td>
</tr>
</table></td>
</tr>
<tr class="">
<th scope="row">Usage</th>
<td>Web & Application</td>
</tr>
<tr class="">
<th scope="row">Related</th>
<td><a href="../reference/TWO_PI">TWO_PI</a><br />
<a href="../reference/HALF_PI">HALF_PI</a><br /></td>
</tr>
</table>