set()

Sets the the vector to a new value.

set() can use separate numbers, as in v.set(1, 2, 3), a p5.Vector object, as in v.set(v2), or an array of numbers, as in v.set([1, 2, 3]).

예제

구문

set([x], [y], [z])
set(value)

매개변수

x
Number: x component of the vector.
y
Number: y component of the vector.
z
Number: z component of the vector.
value
p5.Vector|Number[]: vector to set.

관련 레퍼런스