Point4D.Subtract(Point4D, Point4D) Method

Definition

Subtracts a Point4D structure from a Point4D structure.

C#
public static System.Windows.Media.Media3D.Point4D Subtract(System.Windows.Media.Media3D.Point4D point1, System.Windows.Media.Media3D.Point4D point2);

Parameters

point1
Point4D

The Point4D structure to be subtracted from.

point2
Point4D

The Point4D structure to subtract from point1.

Returns

Returns the difference between point1 and point2.

Examples

The following example shows how to subtract a Point4D structure from a Point4D structure.

C#
// 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);

Applies to

Prodotto Versioni
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also