YAMP.SubPlotValue.InspectIndex C# (CSharp) Method

InspectIndex() private method

private InspectIndex ( Value value, int &index, int &span ) : void
value Value
index int
span int
return void
        void InspectIndex(Value value, out int index, out int span)
        {
            index = 1;
            span = 1;

            if (value is ScalarValue)
                index = ((ScalarValue)value).IntValue;
            else if (value is MatrixValue)
            {
                var M = (MatrixValue)value;
                index = M[1].IntValue;
                span = M.Length;
            }
            else
                throw new YAMPArgumentWrongTypeException(value.Header, new string[] { "Matrix", "Scalar" }, "SubPlot");
        }