You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Manoylov Andriy eb8d3c5f80 add ukrainian translation 10 months ago
..
README-ua.md add ukrainian translation 10 months ago
README-vi.md Translate glossary section (partly) and swap all/any page 4 years ago
README.md Remove trailing whitespaces 7 years ago

README.md

Dot

Calculate the dot product of two vectors

Declaration

float dot(float x, float y)  
float dot(vec2 x, vec2 y)  
float dot(vec3 x, vec3 y)  
float dot(vec4 x, vec4 y)

Parameters

x specifies the first of two vectors

y specifies the second of two vectors

Description

dot() returns the dot product of two vectors, x and y. i.e., x[0]⋅y[0]+x[1]⋅y[1]+... If x and y are the same the square root of the dot product is equivalent to the length of the vector. The input parameters can be floating scalars or float vectors. In case of floating scalars the dot function is trivial and returns the product of x and y.

See Also

cross(), Chapter 07: Shapes