forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdist.xml
More file actions
executable file
·78 lines (53 loc) · 1.59 KB
/
Copy pathdist.xml
File metadata and controls
executable file
·78 lines (53 loc) · 1.59 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>dist()</name>
<category>Math</category>
<subcategory>Calculation</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
// Sets the background gray value based on
// the distance of the mouse from the center
void draw() {
float d = dist(50, 50, mouseX, mouseY);
fill(d*4);
rect(0, 0, 99, 99);
}
]]></code>
</example>
<description><![CDATA[Calculates the distance between two points.]]></description>
<syntax><![CDATA[
dist(<kbd>x1</kbd>, <kbd>y1</kbd>, <kbd>x2</kbd>, <kbd>y2</kbd>);
dist(<kbd>x1</kbd>, <kbd>y1</kbd>, <kbd>z1</kbd>, <kbd>x2</kbd>, <kbd>y2</kbd>, <kbd>z2</kbd>);
]]></syntax>
<parameter>
<label>x1</label>
<description><![CDATA[int or float: x-coordinate of the first point]]></description>
</parameter>
<parameter>
<label>y1</label>
<description><![CDATA[int or float: y-coordinate of the first point]]></description>
</parameter>
<parameter>
<label>z1</label>
<description><![CDATA[int or float: z-coordinate of the first point]]></description>
</parameter>
<parameter>
<label>x2</label>
<description><![CDATA[int or float: x-coordinate of the second point]]></description>
</parameter>
<parameter>
<label>y2</label>
<description><![CDATA[int or float: y-coordinate of the second point]]></description>
</parameter>
<parameter>
<label>z2</label>
<description><![CDATA[int or float: z-coordinate of the second point]]></description>
</parameter>
<returns>float</returns>
<related></related>
<availability>1.0</availability>
<type>Function</type>
<partof>PDE</partof>
</root>