mirror of
https://github.com/patriciogonzalezvivo/thebookofshaders
synced 2024-11-08 01:10:27 +00:00
19 lines
553 B
Markdown
19 lines
553 B
Markdown
## Cross
|
|
Calculate the cross product of two vectors
|
|
|
|
### Declaration
|
|
```glsl
|
|
vec3 cross(vec3 x, vec3 y)
|
|
```
|
|
|
|
### Parameters
|
|
```x``` specifies the first of two vectors
|
|
|
|
```y``` specifies the second of two vectors
|
|
|
|
### Description
|
|
```cross()``` returns the cross product of two vectors, ```x``` and ```y```. The input parameters can only be 3-component floating vectors. The cross product is equivalent to the product of the length of the vectors times the sinus of the(smaller) angle between ```x``` and ```y```.
|
|
|
|
### See Also
|
|
|
|
[dot()](index.html#dot.md) |