--- layout: stdlib-reference --- # cross ## Description Cross product. Returns the cross product of two 3D vectors. ## Signature
vector<T, 3> cross<T>(
vector<T, 3> left,
vector<T, 3> right)
where T : __BuiltinFloatingPointType;
vector<T, 3> cross<T>(
vector<T, 3> left,
vector<T, 3> right)
where T : __BuiltinIntegerType;
## Generic Parameters
#### T: [\_\_BuiltinFloatingPointType](../interfaces/0_builtinfloatingpointtype-029hm/index.html)
#### T: [\_\_BuiltinIntegerType](../interfaces/0_builtinintegertype-029g/index.html)
## Parameters
#### left : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), 3\>
The first vector.
#### right : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), 3\>
The second vector.
## Return value
The cross product of left and right.
## Availability and Requirements
Defined for the following targets:
#### hlsl
Available in all stages.
#### glsl
Available in all stages.
#### cpp
Available in all stages.
#### cuda
Available in all stages.
#### metal
Available in all stages.
#### wgsl
Available in all stages.
#### spirv
Available in all stages.