Skip to content

format

typescript
Vector4.Mul(rhs)

class: Vector4

description

Multiplies the current vector object by another vector or a scalar value and returns the resulting vector.

parameter

param_nametypedescription
rhsnumber|Vector4The vector or scalar value to multiply by.

reture

typedescription
Vector4Returns a new Vector4 object representing the result of multiplying the current vector object by rhs.

code example

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