示例#1
0
//////////////////////////////////////////////////////////////////////////
// Other Methods
    Vec3f Vec3f::Normalize()
    {
        float fSqr = L2Norm_Sqr();
        if(fSqr>1e-10)
            (*this) *= 1.0f/sqrt(fSqr);
		return *this;
    }
示例#2
0
//////////////////////////////////////////////////////////////////////////
// Other Methods
    void Vec3f::Normalize()
    {
        double fSqr = L2Norm_Sqr();
        if(fSqr>1e-6)
            (*this) *= 1.0f/sqrt(fSqr);
    }