Пример #1
0
 /// <summary>
 /// Adds a vector and a scalar.
 /// </summary>
 /// <param name="v">A <see cref="Vector3D"/> instance.</param>
 /// <param name="s">A scalar.</param>
 /// <returns>A new <see cref="Vector3D"/> instance containing the sum.</returns>
 public static Vector3D operator +(double s, Vector3D v)
 {
     return(Vector3D.Add(v, s));
 }
Пример #2
0
 /// <summary>
 /// Adds a vector and a scalar.
 /// </summary>
 /// <param name="vector">A <see cref="Vector3D"/> instance.</param>
 /// <param name="scalar">A double-precision floating-point number.</param>
 /// <returns>A new <see cref="Vector3D"/> instance containing the sum.</returns>
 public static Vector3D operator +(double scalar, Vector3D vector)
 {
     return(Vector3D.Add(vector, scalar));
 }
Пример #3
0
 /// <summary>
 /// Adds two vectors.
 /// </summary>
 /// <param name="u">A <see cref="Vector3D"/> instance.</param>
 /// <param name="v">A <see cref="Vector3D"/> instance.</param>
 /// <returns>A new <see cref="Vector3D"/> instance containing the sum.</returns>
 public static Vector3D operator +(Vector3D u, Vector3D v)
 {
     return(Vector3D.Add(u, v));
 }
Пример #4
0
 /// <summary>
 /// Adds two vectors.
 /// </summary>
 /// <param name="left">A <see cref="Vector3D"/> instance.</param>
 /// <param name="right">A <see cref="Vector3D"/> instance.</param>
 /// <returns>A new <see cref="Vector3D"/> instance containing the sum.</returns>
 public static Vector3D operator +(Vector3D left, Vector3D right)
 {
     return(Vector3D.Add(left, right));
 }