This topic has not yet been rated - Rate this topic

Vector3D.Subtraction Operator (Vector3D, Point3D)

Subtracts a Point3D structure from a Vector3D structure.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)
public static Point3D operator -(
	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.

The following example shows how to use the overloaded subtraction operator to subtract a Point3D structure from a Vector3D structure.

// Subtracts a Vector3D from a Point3D using the overloaded - operator. 
// Returns a Point3D.

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

// Subtracting the vector from the point
pointResult = vector1 - point1;

// pointResult is equal to (10, 25, 39) 

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.