Vector3D.Negate Method ()


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

Negates a Vector3D structure.

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

public void Negate()

The vector has the same magnitude as before, but its direction is now opposite.

The following example shows how to negate a Vector3D structure.

// Negates a Vector3D using the Negate method.

Vector3D vector1 = new Vector3D(20, 30, 40);
Vector3D vectorResult = new Vector3D();

// vector1 is equal to (-20, -30, -40)

.NET Framework
Available since 3.0
Return to top