format
typescript
Vector3.Sub(rhs)class: Vector3
description
Subtracts the calling vector by the input parameter vector.
parameter
| param_name | type | description |
|---|---|---|
| rhs | number|Vector3 | The vector to subtract, can be a number or Vector3. |
reture
| type | description |
|---|---|
Vector3 | The result of the subtraction. |
code example
typescript
let lhs = new Vector3(1,2,3);
let rhs = new Vector3(3,4,5);
let v3_result = lhs.Sub(rhs);
let v3_result_2 = lhs.Sub(1);
Debug.Log("Sub result is",v3_result);
Debug.Log("Sub result is",v3_result_2);