Skip to content

format

typescript
Vector4.Div(rhs)

class: Vector4

description

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

parameter

param_nametypedescription
rhsnumber|Vector4The divisor, which can be a scalar value or a vector.

reture

typedescription
Vector4A new Vector4 object representing the result of dividing the current vector object by rhs.

code example

typescript
let lhs = new Vector4(1, 2, 3, 4);
let div_number = lhs.Div(1);
let div_v4 = lhs.Div(new Vector4(1, 2, 3, 4));