textmode.js / TextmodeVector / sub
Method: sub()
Call Signature
ts
sub(value): this;Subtract components from this vector.
Missing components are treated as 0.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | | readonly number[] | | TextmodeVector | { x: number; y: number; z?: number; } | Vector-like value or component array to subtract. |
Returns
this
This vector.
Example
Call Signature
ts
sub(
x?,
y?,
z?): this;Subtract numeric components from this vector.
Parameters
| Parameter | Type | Description |
|---|---|---|
x? | number | X component to subtract. |
y? | number | Y component to subtract. |
z? | number | Z component to subtract. |
Returns
this
This vector.