forked from jdf/processing-py-site
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPVector_dist.xml
More file actions
55 lines (42 loc) · 1.02 KB
/
PVector_dist.xml
File metadata and controls
55 lines (42 loc) · 1.02 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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>dist()</name>
<category>PVector</category>
<subcategory>Method</subcategory>
<type></type>
<example>
<code><![CDATA[
v1 = PVector(10, 20, 0)
v2 = PVector(60, 80, 0)
d = v1.dist(v2)
print(d) # Prints "78.10249328613281"
]]></code>
</example>
<example>
<code><![CDATA[
v1 = PVector(10, 20, 0)
v2 = PVector(60, 80, 0)
d = PVector.dist(v1, v2)
print(d) # Prints "78.10249328613281"
]]></code>
</example>
<description><![CDATA[
Calculates the Euclidean distance between two points (considering a point as a vector object).
]]></description>
<syntax>
.dist(v)
.dist(v1, v2)
</syntax>
<parameter>
<label>v</label>
<description><![CDATA[PVector: the x, y, and z coordinates of a PVector]]></description>
</parameter>
<parameter>
<label>v1</label>
<description><![CDATA[PVector: any variable of type PVector]]></description>
</parameter>
<parameter>
<label>v2</label>
<description><![CDATA[PVector: any variable of type PVector]]></description>
</parameter>
</root>