You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds x, y, and z components to a vector, adds one vector to another, or adds two independent vectors together. The version of the method that adds two vectors together is a static method and returns a PVector, the others have no return value -- they act directly on the vector. See the examples for more context.
]]></description>
<syntax>
.add(<c>v</c>)
.add(<c>x</c>, <c>y</c>, <c>z</c>)
.add(<c>v1</c>, <c>v2</c>)
.add(<c>v1</c>, <c>v2</c>, <c>target</c>)
</syntax>
<parameter>
<label>v</label>
<description><![CDATA[PVector: the vector to be added]]></description>
</parameter>
<parameter>
<label>x</label>
<description><![CDATA[float: x component of the vector]]></description>
</parameter>
<parameter>
<label>y</label>
<description><![CDATA[float: y component of the vector]]></description>
</parameter>
<parameter>
<label>z</label>
<description><![CDATA[float: z component of the vector]]></description>
</parameter>
<parameter>
<label>v1</label>
<description><![CDATA[PVector: a vector]]></description>
</parameter>
<parameter>
<label>v2</label>
<description><![CDATA[PVector: another vector]]></description>
</parameter>
<parameter>
<label>target</label>
<description><![CDATA[PVector: the target vector (if null, a new vector will be created)]]></description>