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

            #endregion Fields

            #region Constructors

            public VectorEnumerator(Vector theVector)
            {
                this.theVector = theVector;
                location = -1;
            }
Esempio n. 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();
 }
Esempio n. 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;
 }