Name

dist()

Examples
v1 = PVector(10, 20, 0)
v2 = PVector(60, 80, 0)
d = v1.dist(v2)
print(d)  # Prints "78.10249328613281"
v1 = PVector(10, 20, 0)
v2 = PVector(60, 80, 0)
d = PVector.dist(v1, v2)
print(d)  # Prints "78.10249328613281"
Description Calculates the Euclidean distance between two points (considering a point as a vector object).
Syntax
.dist(v)
.dist(v1, v2)
Parameters
vPVector: the x, y, and z coordinates of a PVector
v1PVector: any variable of type PVector
v2PVector: any variable of type PVector

Updated on Mon Sep 21 15:53:25 2020.

If you see any errors or have comments, please let us know.