Skip to content

format

typescript
Vector3.SubAssign(rhs)

class: Vector3

description

Subtracts the calling vector by the input vector or number and assigns the result to the calling vector.

parameter

param_nametypedescription
rhsnumber|Vector3The vector or number to subtract from the calling vector.

reture

typedescription
voidNone

code example

typescript
let lhs = new Vector3(1,2,3);
let rhs = new Vector3(3,4,5);
lhs.SubAssign(rhs);
Debug.Log("SubAssign result is",lhs);
lhs.SubAssign(1);
Debug.Log("SubAssign result is",lhs);