Download

FVector::Normalize need a Tolerance, what is Tolerance?

Hi, I want to convert a Blueprint to C++

I know Light Direction is a FLinearColor, but now, i searched normalize and I found the function, but needs a float arg,so, what is Tolerance?
I found the definition Minimum squared length of vector for normalization, but I dont understand so good.

So, if I’m thinking now, this LinearColor which have


Light_Direction.R = -2.0f;
Light_Direction.G = 0.0f;
Light_Direction.B = -1.0f;
Light_Direction.A = 1.0f;

So I have a XYZ axes:

So, in my LinearColor, what are X, Y and Z?, let say R = X, G = Y, B = Z, Alpha channel what are?

I found this on youtube: https://www.youtube.com/watch?v=7fn03DIW3Ak
How i should use Normalize function in C++ ?

sqrt(RR+GG+BB+AA)?
Ex:

sqrt((-2)(-2) + 00 + (-1)(-1) + 11) = sqrt(6) = 2.44948974278 → This is tolerance?

solved:



		FVector LD = FVector::FVector(Light_Direction);

		if (LD.Normalize()) {

			// float FVector::DotProduct( const FVector& A, const FVector& B )
		}