/**
* 得到这个向量的二维分量的平方长度。
*
*/
//Vector.h
/**
* Get the squared length of the 2D components of this vector.
*
* @return The squared 2D length of this vector.
*/
float SizeSquared2D() const ;
FORCEINLINE float FVector::SizeSquared2D() const
{
return X*X + Y*Y;
}
这段代码定义了一个FVector类的方法SizeSquared2D,用于计算二维向量的平方长度。该方法通过直接相乘并求和向量的X和Y分量来实现,返回值为平方长度。
5144

被折叠的 条评论
为什么被折叠?



