vector.cross
EditReturns the cross product of two vectors. This is a vector that is perpendicular to both vectors.
cross = vector.cross(a, b)Arguments
| Name | Type | Description |
| a | vector | The first vector. |
| b | vector | The second vector. |
Returns
| Name | Type | Description |
| cross | vector |
A vector perpendicular to both a and b.
|
Notes
If the two input vectors are normalized, the cross product will be normalized as well.
Example
vector.cross(vector(1, 0, 0), vector(0, 1, 0)) --> vector(0, 0, 1)