Vector3D.Subtract Method (Vector3D, Point3D)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Subtracts a Point3D structure from a Vector3D structure.

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

public static Point3D Subtract(
	Vector3D vector,
	Point3D point
)

Parameters

vector
Type: System.Windows.Media.Media3D.Vector3D

The Vector3D structure to be subtracted from.

point
Type: System.Windows.Media.Media3D.Point3D

The Point3D structure to subtract from vector.

Return Value

Type: System.Windows.Media.Media3D.Point3D

The result of subtracting point from vector.

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

Point3D point1 = new Point3D(10, 5, 1);
Vector3D vector1 = new Vector3D(20, 30, 40);
Point3D pointResult = new Point3D();

pointResult = Vector3D.Subtract(vector1, point1); 
// pointResult is equal to (10, 25, 39) 

.NET Framework
Available since 3.0
Return to top
Show: