StandardizedDiffuseAlbedoMaps.CalibratedTexture.ComputeMean C# (CSharp) Method

ComputeMean() private method

Computes the statistical mean of the values
private ComputeMean ( ImageUtility _Values ) : ImageUtility.float3
_Values ImageUtility
return ImageUtility.float3
        private ImageUtility.float3 ComputeMean( ImageUtility.float3[] _Values )
        {
            ImageUtility.float3	AvgXYZ = new ImageUtility.float3( 0, 0, 0 );
            for ( int i=0; i < _Values.Length; i++ )
                AvgXYZ += _Values[i];
            AvgXYZ = (1.0f / _Values.Length) * AvgXYZ;
            return AvgXYZ;
        }