Point4D.Subtraction(Point4D, Point4D) Operator

Definition

Subtrahiert eine Point4D-Struktur von einer Point4D-Struktur und gibt das Ergebnis als Point4D-Struktur zurück.Subtracts a Point4D structure from a Point4D structure and returns the result as a Point4D structure.

public:
 static System::Windows::Media::Media3D::Point4D operator -(System::Windows::Media::Media3D::Point4D point1, System::Windows::Media::Media3D::Point4D point2);
public static System.Windows.Media.Media3D.Point4D operator - (System.Windows.Media.Media3D.Point4D point1, System.Windows.Media.Media3D.Point4D point2);
static member ( - ) : System.Windows.Media.Media3D.Point4D * System.Windows.Media.Media3D.Point4D -> System.Windows.Media.Media3D.Point4D
Public Shared Operator - (point1 As Point4D, point2 As Point4D) As Point4D

Parameter

point1
Point4D

Die Point4D-Struktur, von der subtrahiert werden soll.The Point4D structure to be subtracted from.

point2
Point4D

Die von point1 zu subtrahierende Point4D-Struktur.The Point4D structure to subtract from point1.

Gibt zurück

Gibt die Differenz von point1 und point2 zurück.Returns the difference between point1 and point2.

Beispiele

Das folgende Beispiel zeigt, wie der überladene Subtraktions Operator verwendet wird, Point4D um eine- Point4D Struktur von einer-Struktur zu subtrahierenThe following example shows how to use the overloaded subtraction operator to subtract a Point4D structure from a Point4D structure.

// Subtracts a Point4D from a Point4D using the overloaded - operator.
// Returns a Point4D.

Point4D point1 = new Point4D(10, 5, 1, 4);
Point4D point2 = new Point4D(15, 40, 60, 75);
Point4D pointResult = new Point4D();

pointResult = point1 - point2;
// pointResult is equal to (-5, -35, -59, -71) 

// Displaying Results
syntaxString = "pointResult = point1 - point2;";
resultType = "Point4D";
operationString = "Subtracting a Vector3D from a Point4D";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Subtracts a Point4D from a Point4D using the overloaded - operator.
' Returns a Point4D.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim point2 As New Point4D(15, 40, 60, 75)
Dim pointResult As New Point4D()

pointResult = point1 - point2
' pointResult is equal to (-5, -35, -59, -71) 

' Displaying Results
syntaxString = "pointResult = point1 - point2"
resultType = "Point4D"
operationString = "Subtracting a Vector3D from a Point4D"
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)

Gilt für:

Siehe auch