Skip to content

textmode.js / TextmodeVector / sub

Method: sub()

Call Signature

ts
sub(value): this;

Subtract components from this vector.

Missing components are treated as 0.

Parameters

ParameterTypeDescription
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

ParameterTypeDescription
x?numberX component to subtract.
y?numberY component to subtract.
z?numberZ component to subtract.

Returns

this

This vector.

Example