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