Point4D.Subtract Method

Subtracts a Point4D structure from a Point4D structure.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public static Point4D Subtract(
	Point4D point1,
	Point4D point2
)

Parameters

point1
Type: System.Windows.Media.Media3D.Point4D
The Point4D structure to be subtracted from.
point2
Type: System.Windows.Media.Media3D.Point4D
The Point4D structure to subtract from point1.

Return Value

Type: System.Windows.Media.Media3D.Point4D
Returns the difference between point1 and point2.

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


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


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft