/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }