format
typescript
Vector2.Div(rhs)class: Vector2
description
Divides the current vector by another vector or a scalar value and returns the resulting vector.
parameter
| param_name | type | description |
|---|---|---|
| rhs | number|Vector2 | The divisor, which can be a scalar value or a vector. |
reture
| type | description |
|---|---|
Vector2 | A new Vector2 object representing the result of dividing the current vector object by rhs. |
code example
typescript
let lhs = new Vector2(1, 2);
let div_number = lhs.Div(1);
let div_v2 = lhs.Div(new Vector2(1, 2));