NPlot.PlotSurface2D.DetermineAxesToDraw C# (CSharp) Method

DetermineAxesToDraw() private method

private DetermineAxesToDraw ( Axis &xAxis1, Axis &xAxis2, Axis &yAxis1, Axis &yAxis2 ) : void
xAxis1 Axis
xAxis2 Axis
yAxis1 Axis
yAxis2 Axis
return void
        private void DetermineAxesToDraw(out Axis xAxis1, out Axis xAxis2, out Axis yAxis1, out Axis yAxis2)
        {
            xAxis1 = m_xAxis1;
            xAxis2 = m_xAxis2;
            yAxis1 = m_yAxis1;
            yAxis2 = m_yAxis2;

            if (m_xAxis1 == null)
            {
                if (m_xAxis2 == null)
                {
                    throw new NPlotException("Error: No X-Axis specified");
                }
                xAxis1 = (Axis)m_xAxis2.Clone();
                xAxis1.HideTickText = true;
                xAxis1.TicksAngle = -(float)Math.PI / 2.0f;
            }

            if (m_xAxis2 == null)
            {
                // don't need to check if xAxis1_ == null, as case already handled above.
                xAxis2 = (Axis)m_xAxis1.Clone();
                xAxis2.HideTickText = true;
                xAxis2.TicksAngle = (float)Math.PI / 2.0f;
            }

            if (m_yAxis1 == null)
            {
                if (m_yAxis2 == null)
                {
                    throw new NPlotException("Error: No Y-Axis specified");
                }
                yAxis1 = (Axis)m_yAxis2.Clone();
                yAxis1.HideTickText = true;
                yAxis1.TicksAngle = (float)Math.PI / 2.0f;
            }

            if (m_yAxis2 == null)
            {
                // don't need to check if yAxis1_ == null, as case already handled above.
                yAxis2 = (Axis)m_yAxis1.Clone();
                yAxis2.HideTickText = true;
                yAxis2.TicksAngle = -(float)Math.PI / 2.0f;
            }
        }