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.set(x, y)

Sets the components of the vector using separate variables, the data from a PVector instance, or the values from a numeric array.

set(x, y)

Parameters:
NameDescription
xthe x component
ythe y component

set(vec)

Parameters:
NameDescription
vecAny PVector instance

set(arr)

Parameters:
NameDescription
arrA numeric array

Want to join the conversation?

No posts yet.