/// <summary> /// Subtracts a vector from 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 difference.</returns> /// <remarks> /// result[i] = s - v[i] /// </remarks> public static Vector3D operator -(double s, Vector3D v) { return(Vector3D.Subtract(s, v)); }
/// <summary> /// Subtracts a scalar from a vector. /// </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 difference.</returns> /// <remarks> /// result[i] = v[i] - s /// </remarks> public static Vector3D operator -(Vector3D v, double s) { return(Vector3D.Subtract(v, s)); }
/// <summary> /// Subtracts a vector from a vector. /// </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 difference.</returns> /// <remarks> /// result[i] = v[i] - w[i]. /// </remarks> public static Vector3D operator -(Vector3D u, Vector3D v) { return(Vector3D.Subtract(u, v)); }
/// <summary> /// Subtracts a vector from 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 difference.</returns> /// <remarks> /// result[i] = scalar - vector[i] /// </remarks> public static Vector3D operator -(double scalar, Vector3D vector) { return(Vector3D.Subtract(scalar, vector)); }
/// <summary> /// Subtracts a scalar from a vector. /// </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 difference.</returns> /// <remarks> /// result[i] = vector[i] - scalar /// </remarks> public static Vector3D operator -(Vector3D vector, double scalar) { return(Vector3D.Subtract(vector, scalar)); }
/// <summary> /// Subtracts a vector from a vector. /// </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 difference.</returns> /// <remarks> /// result[i] = left[i] - right[i]. /// </remarks> public static Vector3D operator -(Vector3D left, Vector3D right) { return(Vector3D.Subtract(left, right)); }