GameFramework.KdObjectTree.CalcSquareDistToRectangle C# (CSharp) Method

CalcSquareDistToRectangle() private static method

private static CalcSquareDistToRectangle ( float distMinX, float distMaxX, float distMinZ, float distMaxZ ) : float
distMinX float
distMaxX float
distMinZ float
distMaxZ float
return float
        private static float CalcSquareDistToRectangle(float distMinX, float distMaxX, float distMinZ, float distMaxZ)
        {
            float ret = 0;
            if (distMinX > 0) ret += distMinX * distMinX;
            if (distMaxX > 0) ret += distMaxX * distMaxX;
            if (distMinZ > 0) ret += distMinZ * distMinZ;
            if (distMaxZ > 0) ret += distMaxZ * distMaxZ;
            return ret;
        }