Skip to content

textmode.js / TextmodeVector / cross

Method: cross()

Call Signature

ts
cross(value): TextmodeVector;

Calculate the cross product with another vector-like value.

Parameters

ParameterTypeDescription
value| readonly number[] | | TextmodeVector | { x: number; y: number; z?: number; }Vector-like value or component array.

Returns

TextmodeVector

A new vector containing the cross product.

Example

Call Signature

ts
cross(
   x?, 
   y?, 
   z?): TextmodeVector;

Calculate the cross product with numeric components.

Parameters

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

Returns

TextmodeVector

A new vector containing the cross product.

Example