NPlot.PlotSurface2D.DetermineScaleFactor C# (CSharp) Method

DetermineScaleFactor() private method

private DetermineScaleFactor ( int w, int h ) : float
w int
h int
return float
        private float DetermineScaleFactor(int w, int h)
        {
            float diag = (float)Math.Sqrt(w * w + h * h);
            float scaleFactor = (diag / 1400.0f) * 2.4f;

            if (scaleFactor > 1.0f)
            {
                return scaleFactor;
            }
            else
            {
                return 1.0f;
            }
        }