If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Course: Unlisted resources area > Unit 2

Lesson 1: ProcessingJS documentation

PVector.dist(vector2)

Calculates the Euclidean distance between two points (considering a point as a vector object).

vector.dist(vector2)

Parameters:
NameDescription
vector2Any PVector instance

PVector.dist(vector1, vector2)

Parameters:
NameDescription
vector1Any PVector instance
vector2Any PVector instance

Want to join the conversation?

No posts yet.