--- layout: stdlib-reference --- # dot ## Description Vector dot product. Returns the dot product of two vectors. ## Signature
T dot<T>(
T x,
T y)
where T : __BuiltinFloatingPointType;
T dot<T, int N>(
vector<T, N> x,
vector<T, N> y)
where T : __BuiltinFloatingPointType;
T dot<T, int N>(
vector<T, N> x,
vector<T, N> y)
where T : __BuiltinIntegerType;
## Generic Parameters
#### T: [\_\_BuiltinFloatingPointType](../interfaces/0_builtinfloatingpointtype-029hm/index.html)
#### N : int
#### T: [\_\_BuiltinIntegerType](../interfaces/0_builtinintegertype-029g/index.html)
## Parameters
#### x : [T](dot.html#typeparam-T)
The first vector.
#### y : [T](dot.html#typeparam-T)
The second vector.
#### x : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\>
The first vector.
#### y : [vector](../types/vector/index.html)\<[T](../types/vector/index.html#typeparam-T), [N](../types/vector/index.html#decl-N)\>
The second vector.
## Return value
The dot product of x and y.
## Remarks
When x and y are scalars, this function is equivalent to x*y.
## 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.
#### llvm
Available in all stages.