Skip to content

format

typescript
Vector4.AddAssign(rhs)

class: Vector4

description

Adds the current vector object with another vector or a scalar value, and assigns the result to the current vector object.

parameter

param_nametypedescription
rhsnumber|Vector4The vector or scalar value to add.

reture

typedescription
void

code example

typescript
let v4 = new Vector4(-1, -2, -3, -4);
v4.AddAssign(1);
v4.AddAssign(new Vector4(2, 3, 4, 5));