示例#1
0
 public Vector(Vector rhs)
 {
     x = rhs.x;
      y = rhs.y;
      z = rhs.z;
 }
示例#2
0
            Vector theVector; // Vector object that this enumerato refers to

            #endregion Fields

            #region Constructors

            public VectorEnumerator(Vector theVector)
            {
                this.theVector = theVector;
                location = -1;
            }
示例#3
0
 static void Main(string[] args)
 {
     Vector Vect1 = new Vector(1.0, 2.0, 5.0);
      foreach (double Component in Vect1)
      {
     foreach (double Next in Vect1)
        Console.Write("  " + Next);
     Console.WriteLine(Component);
      }
      Console.ReadLine();
 }
示例#4
0
 public static Vector operator +(Vector lhs, Vector rhs)
 {
     Vector Result = new Vector(lhs);
      Result.x += rhs.x;
      Result.y += rhs.y;
      Result.z += rhs.z;
      return Result;
 }