MissionPlanner.HIL.Vector3.this C# (CSharp) Method

this() public method

public this ( int index ) : double
index int
return double
        public double this[int index]
        {
            get
            {
                if (index == 0)
                    return x;
                if (index == 1)
                    return y;
                if (index == 2)
                    return z;

                throw new Exception("Bad index");
            }
            set
            {
                if (index == 0)
                    x = value;
                if (index == 1)
                    y = value;
                if (index == 2)
                    z = value;

                throw new Exception("Bad index");
            }
        }