//Vector.h
/**
* Calculate the dot product between this and another vector.
*
* @param V The other vector.
* @return The dot product.
*/
FORCEINLINE float operator|(const FVector& V) const;
//Vector.cpp
FORCEINLINE float FVector::operator|(const FVector& V) const
{
return X*V.X + Y*V.Y + Z*V.Z;
}
计算这个向量和另一个向量V之间的点积