Udostępnij za pośrednictwem


Point4D.Subtract(Point4D, Point4D) Metoda

Definicja

Odejmuje Point4D strukturę od Point4D struktury.

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

Parametry

point1
Point4D

Struktura Point4D , odejmowana od.

point2
Point4D

Struktura Point4D do odejmowania od .point1

Zwraca

Point4D

Zwraca różnicę między point1 i point2.

Przykłady

W poniższym przykładzie pokazano, jak odjąć Point4D strukturę od Point4D struktury.

// Subtracts a Point3D from a Point4D using the static Subtract method. 
// Returns a Point4D.

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

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

// Displaying Results
syntaxString = "pointResult = Point4D.Subtract(point1, point2);";
resultType = "Point4D";
operationString = "Subtracting a Vector3D from a Point4D";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Subtracts a Point3D from a Point4D using the static Subtract method. 
' 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 = Point4D.Subtract(point1, point2)
' pointResult is equal to (-5, -35, -59, -71)

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

Dotyczy

Zobacz też