Exemple #1
0
 /// <summary>
 /// Subtracts a vector from 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 difference.</returns>
 /// <remarks>
 /// result[i] = s - v[i]
 /// </remarks>
 public static Vector2D operator-(double s, Vector2D v)
 {
     return(Vector2D.Subtract(s, v));
 }
Exemple #2
0
 /// <summary>
 /// Subtracts a scalar from a vector.
 /// </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 difference.</returns>
 /// <remarks>
 /// result[i] = v[i] - s
 /// </remarks>
 public static Vector2D operator-(Vector2D v, double s)
 {
     return(Vector2D.Subtract(v, s));
 }
Exemple #3
0
 /// <summary>
 /// Subtracts a vector from a vector.
 /// </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 difference.</returns>
 /// <remarks>
 ///	result[i] = v[i] - w[i].
 /// </remarks>
 public static Vector2D operator-(Vector2D u, Vector2D v)
 {
     return(Vector2D.Subtract(u, v));
 }
Exemple #4
0
 /// <summary>
 /// Subtracts a vector from 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 difference.</returns>
 /// <remarks>
 /// result[i] = scalar - vector[i]
 /// </remarks>
 public static Vector2D operator -(double scalar, Vector2D vector)
 {
     return(Vector2D.Subtract(scalar, vector));
 }
Exemple #5
0
 /// <summary>
 /// Subtracts a scalar from a vector.
 /// </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 difference.</returns>
 /// <remarks>
 /// result[i] = vector[i] - scalar
 /// </remarks>
 public static Vector2D operator -(Vector2D vector, double scalar)
 {
     return(Vector2D.Subtract(vector, scalar));
 }
Exemple #6
0
 /// <summary>
 /// Subtracts a vector from a vector.
 /// </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 difference.</returns>
 /// <remarks>
 ///	result[i] = left[i] - right[i].
 /// </remarks>
 public static Vector2D operator -(Vector2D left, Vector2D right)
 {
     return(Vector2D.Subtract(left, right));
 }