format
typescript
Vector3.Cross(lhs, rhs)class: Vector3
description
Calculates the cross product of two vectors.
This method returns a new vector that is perpendicular to the original vectors and has a length equal to the area of the parallelogram formed by the original vectors.
parameter
| param_name | type | description |
|---|---|---|
| lhs | Vector3 | The first vector participating in the cross product. |
| rhs | Vector3 | The second vector participating in the cross product. |
return
| type | description |
|---|---|
Vector3 | The result of the cross product. |
code example
typescript
let from = new Vector3(1,2,3);
let to = new Vector3(3,4,5);
Debug.Log("Cross is",Vector3.Cross(from,to));