static float Dot( Vector3& a, Vector3& b )
float Dot( Vector3& b )

book_4_sparkGenerated
code_blocksInput

Description

The Vector3.Dot method calculates the dot product of two 3D vectors. The dot product is a scalar value that is the result of the sum of the products of the corresponding components of the two vectors. It is a measure of how much one vector extends in the direction of another vector.

Usage

To use the Vector3.Dot method, pass two Vector3 references as parameters. The method will return a float representing the dot product of the two vectors.

Example

Vector3 vectorA = new Vector3(1.0f, 2.0f, 3.0f);
Vector3 vectorB = new Vector3(4.0f, 5.0f, 6.0f);

float dotProduct = Vector3.Dot(ref vectorA, ref vectorB);
// dotProduct will be 32.0f