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_name | type | description |
|---|---|---|
| rhs | number|Vector4 | The divisor, which can be a scalar value or a vector. |
reture
| type | description |
|---|---|
Vector4 | A 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));