format
typescript
Vector2.MulAssign(rhs)class: Vector2
description
Multiplies the current vector object by another vector or a scalar value and assigns the result to the current vector object.
parameter
| param_name | type | description |
|---|---|---|
| rhs | number|Vector2 | The vector or scalar value to multiply by. |
reture
| type | description |
|---|---|
void |
code example
typescript
let v2 = new Vector2(-1, -2);
v2.MulAssign(1);
v2.MulAssign(new Vector2(2, 3));