Ejemplo n.º 1
0
 /// <summary>
 /// Creates a mathematical vector 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;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a mathematical vector 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);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns the mathematical Tan of the angle specified
 /// </summary>
 /// <param name="value">The Angle to find the Tan of</param>
 /// <returns>Double, the Tan of the Angle</returns>
 public static double Tan(Angle value)
 {
     return(Math.Tan(value.Radians));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Returns a new instance of the Angle class with the same angle as this object.
        /// </summary>
        /// <returns>Angle which has the same values</returns>
        public Angle Copy()
        {
            Angle newAngle = new Angle(_rad);

            return(newAngle);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Returns the mathematical Cos of the angle specified
 /// </summary>
 /// <param name="value">The Angle to find the cosign of</param>
 /// <returns>Double, the cosign of the angle specified</returns>
 public static double Cos(Angle value)
 {
     return(Math.Cos(value.Radians));
 }