Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Vector"/> class from the origin with the new magnitude and directions specified.
 /// </summary>
 /// <param name="newMagnitude">Double, the length of the vector</param>
 /// <param name="theta">The angle in the x-y plane</param>
 /// <param name="phi">The angle in the z direction</param>
 public Vector(double newMagnitude, Angle theta, Angle phi)
 {
     X = newMagnitude * Angle.Cos(theta) * Angle.Cos(phi);
     Y = newMagnitude * Angle.Sin(theta) * Angle.Cos(phi);
     Z = newMagnitude * Angle.Sin(phi);
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Vector"/> class in the X-Y plane with angle Theta.
 /// </summary>
 /// <param name="newMagnitude">Double, The magnitude of the vector</param>
 /// <param name="theta">Angle, The direction measured counterclockwise from Positive X Axis </param>
 public Vector(double newMagnitude, Angle theta)
 {
     X = newMagnitude * Angle.Cos(theta);
     Y = newMagnitude * Angle.Sin(theta);
     Z = 0;
 }