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.div(scalar)

Divides a vector by a scalar or divides one vector by another.

vector.div(scalar)

Parameters:
NameDescription
scalarthe number to divide with the vector

vector.div(vector2)

Parameters:
NameDescription
vector2Any PVector instance

PVector.div(vector, scalar)

Parameters:
NameDescription
vectorAny PVector instance
scalarthe number to divide with the vector

PVector.div(vector1, vector2)

Parameters:
NameDescription
vector1Any PVector instance
vector2Any PVector instance

Want to join the conversation?

No posts yet.