textmode.js / TextmodeVector / cross
Method: cross()
Call Signature
ts
cross(value): TextmodeVector;Calculate the cross product with another vector-like value.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | | readonly number[] | | TextmodeVector | { x: number; y: number; z?: number; } | Vector-like value or component array. |
Returns
A new vector containing the cross product.
Example
Call Signature
ts
cross(
x?,
y?,
z?): TextmodeVector;Calculate the cross product with numeric components.
Parameters
| Parameter | Type | Description |
|---|---|---|
x? | number | X component. |
y? | number | Y component. |
z? | number | Z component. |
Returns
A new vector containing the cross product.