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, N:int>( vector<T, N> x, vector<T, N> y) where T : __BuiltinFloatingPointType; T dot<T, N:int>( vector<T, N> x, vector<T, N> y) where T : __BuiltinIntegerType;
Generic Parameters
T: __BuiltinFloatingPointType
N : int
T: __BuiltinIntegerType
Parameters
x : T
The first vector.
y : T
The second vector.
x : vector<T, N>
The first vector.
y : vector<T, N>
The second vector.
Return value
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.